Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(730)

Issue 2455823002: Support generic synchronization against an IPC::Channel (Closed)

Created:
4 years, 1 month ago by Ken Rockot(use gerrit already)
Modified:
4 years, 1 month ago
Reviewers:
jam
CC:
Aaron Boodman, abarth-chromium, chromium-reviews, darin (slow to review), darin-cc_chromium.org, jam, mlamouri+watch-content_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Support generic synchronization against an IPC::Channel Exposes a generic way to synchronize against an IPC::Channel's message FIFO. A simple Event interface is introduced with a single Signal() message, and an API is added to Channel/ChannelProxy to create a new Event pipe, send one end over a Channel for the other side to signal immediately, and pass the other end to anyone who wants to synchronize against that Channel's FIFO. See the new IPC test for a complete working example. This feature is intended to help satisfy simple ordering guarantees as we transition to Mojo IPC, while avoiding the use of associated interfaces where strict per-message FIFO is not really necessary. BUG=361001, 612500

Patch Set 1 : . #

Patch Set 2 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+408 lines, -15 lines) Patch
M ipc/BUILD.gn View 1 3 chunks +9 lines, -0 lines 0 comments Download
M ipc/DEPS View 1 1 chunk +1 line, -0 lines 0 comments Download
M ipc/ipc.mojom View 1 2 chunks +6 lines, -0 lines 0 comments Download
M ipc/ipc_channel.h View 1 2 chunks +6 lines, -0 lines 0 comments Download
M ipc/ipc_channel_common.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download
M ipc/ipc_channel_mojo.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M ipc/ipc_channel_mojo.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download
M ipc/ipc_channel_mojo_unittest.cc View 1 4 chunks +232 lines, -0 lines 0 comments Download
M ipc/ipc_channel_proxy.h View 1 3 chunks +9 lines, -0 lines 0 comments Download
M ipc/ipc_channel_proxy.cc View 1 2 chunks +16 lines, -0 lines 0 comments Download
M ipc/ipc_message_pipe_reader.h View 1 2 chunks +4 lines, -0 lines 0 comments Download
M ipc/ipc_message_pipe_reader.cc View 1 2 chunks +10 lines, -0 lines 0 comments Download
M ipc/ipc_test.mojom View 1 2 chunks +18 lines, -0 lines 0 comments Download
M ipc/ipc_test_base.h View 1 2 chunks +29 lines, -7 lines 0 comments Download
M ipc/ipc_test_base.cc View 1 2 chunks +41 lines, -8 lines 0 comments Download
M mojo/common/BUILD.gn View 2 chunks +7 lines, -0 lines 0 comments Download
A mojo/common/event.mojom View 1 chunk +10 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (9 generated)
Ken Rockot(use gerrit already)
4 years, 1 month ago (2016-10-28 23:47:22 UTC) #8
yzshen1
4 years, 1 month ago (2016-11-04 17:08:26 UTC) #11
On 2016/10/28 23:47:22, Ken Rockot wrote:

Just trying to understand this CL better: Singling an event happens on the IO
thread, so if I send an IPC message targeting the UI thread, and then send an
event. When the event is signaled, there is no guarantee that the message
reaches its destination. I guess the use case you have in mind doesn't care
about this?

It seems an alternative is to send the event in the IPC message that we would
like to synchronize with, and let the receiver does the work of signaling. But
that assumes that we can modify the IPC message and its handler.

Thanks!

Powered by Google App Engine
This is Rietveld 408576698