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

Issue 2090763002: AwakableList: For persistent awakables, make Add() call Awake() with reason INITIALIZE. (Closed)

Created:
4 years, 6 months ago by viettrungluu
Modified:
4 years, 6 months ago
Reviewers:
vardhan
CC:
mojo-reviews_chromium.org, gregsimon, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org
Base URL:
https://github.com/domokit/mojo.git@work795_wait_set_4.7-x-work794_wait_set_4.6
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

AwakableList: For persistent awakables, make Add() call Awake() with reason INITIALIZE. This will let WaitSetDispatcher actually properly track the states of the things it's tracking. (This is not done in this change.) One may wonder why this is desirable -- why can't the caller of Add() just check/record the state before calling Add()? The problem has to do with lock order. E.g., WaitSetDispatcher can't call other dispatchers' methods under its mutex. In particular, it can't call Dispatcher::AddAwakable() nor GetHandleSignalsState(). So getting the initial state and arranging to get updates would always necessarily be subject to a race condition. R=vardhan@google.com BUG=#350 Committed: https://chromium.googlesource.com/external/mojo/+/68d8506dfe9ea43191ea430d9377a65e5063300e

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+328 lines, -266 lines) Patch
M mojo/edk/system/awakable.h View 1 chunk +16 lines, -3 lines 0 comments Download
M mojo/edk/system/awakable.cc View 1 chunk +4 lines, -2 lines 0 comments Download
M mojo/edk/system/awakable_list.h View 1 chunk +9 lines, -5 lines 0 comments Download
M mojo/edk/system/awakable_list.cc View 1 chunk +4 lines, -1 line 0 comments Download
M mojo/edk/system/awakable_list_unittest.cc View 23 chunks +234 lines, -198 lines 0 comments Download
M mojo/edk/system/data_pipe.cc View 2 chunks +26 lines, -24 lines 0 comments Download
M mojo/edk/system/local_message_pipe_endpoint.cc View 1 chunk +11 lines, -12 lines 0 comments Download
M mojo/edk/system/simple_dispatcher.cc View 1 chunk +11 lines, -12 lines 0 comments Download
M mojo/edk/system/wait_set_dispatcher.cc View 2 chunks +13 lines, -9 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 4 (1 generated)
viettrungluu
4 years, 6 months ago (2016-06-22 22:10:02 UTC) #1
vardhan
lgtm
4 years, 6 months ago (2016-06-23 18:13:54 UTC) #2
viettrungluu
4 years, 6 months ago (2016-06-23 20:01:45 UTC) #4
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
68d8506dfe9ea43191ea430d9377a65e5063300e (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698