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

Issue 2433773005: Move OS_WIN specific logic in MessagePumpDefault::Run into waitable_event_win.cc (Closed)

Created:
4 years, 2 months ago by stanisc
Modified:
4 years ago
Reviewers:
danakj
CC:
chromium-reviews, sadrul
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Move OS_WIN specific logic in MessagePumpDefault::Run into waitable_event_win.cc This is a followup for https://codereview.chromium.org/2086123002/. This change removes the WIN_OS specific timed wait logic from MessagePumpDefault::Run implementation and moves it to OS_WIN specific WaitableEvent implementation. This will make OS_WIN TimedWait behavior consistent with the posix implementation: 1) A sub-ms wait doesn't time out promptly (unless the timeout is exactly zero). 2) Also it doesn't time out earlier than the specified max_time. 3) Introduced WaitableEvent::TimedWaitUntil method that waits until the specified absolute deadline. BUG=623223, 465948 Committed: https://crrev.com/acf6801129dff3dba81f6f105713aab173a73e2c Cr-Commit-Position: refs/heads/master@{#435388}

Patch Set 1 #

Patch Set 2 : Fix build error #

Patch Set 3 : Fixed test issue #

Total comments: 11

Patch Set 4 : Added WaitableEvent::TimedWaitUntil #

Patch Set 5 : Fixed posix implementation of WaitableEvent::Wait() #

Total comments: 13

Patch Set 6 : Addressed CR feedback #

Patch Set 7 : Special handling of is_null() TimeTicks in TimedWaitUntil #

Total comments: 6

Patch Set 8 : Addressed CR feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+141 lines, -75 lines) Patch
M base/message_loop/message_pump_default.cc View 1 2 3 4 5 6 7 2 chunks +5 lines, -34 lines 0 comments Download
M base/synchronization/waitable_event.h View 1 2 3 4 5 6 7 2 chunks +10 lines, -4 lines 0 comments Download
M base/synchronization/waitable_event_posix.cc View 1 2 3 4 5 6 7 1 chunk +10 lines, -5 lines 0 comments Download
M base/synchronization/waitable_event_unittest.cc View 1 2 3 4 5 2 chunks +49 lines, -8 lines 0 comments Download
M base/synchronization/waitable_event_win.cc View 1 2 3 4 5 6 7 2 chunks +67 lines, -24 lines 0 comments Download

Messages

Total messages: 65 (48 generated)
stanisc
PTAL!
4 years, 2 months ago (2016-10-20 21:50:14 UTC) #17
danakj
https://codereview.chromium.org/2433773005/diff/40001/base/synchronization/waitable_event_win.cc File base/synchronization/waitable_event_win.cc (right): https://codereview.chromium.org/2433773005/diff/40001/base/synchronization/waitable_event_win.cc#newcode73 base/synchronization/waitable_event_win.cc:73: bool WaitableEvent::TimedWait(const TimeDelta& max_time) { nit: can you name ...
4 years, 1 month ago (2016-10-21 22:01:22 UTC) #18
stanisc
https://codereview.chromium.org/2433773005/diff/40001/base/synchronization/waitable_event_win.cc File base/synchronization/waitable_event_win.cc (right): https://codereview.chromium.org/2433773005/diff/40001/base/synchronization/waitable_event_win.cc#newcode83 base/synchronization/waitable_event_win.cc:83: TimeTicks target_time = TimeTicks::Now() + max_time; On 2016/10/21 22:01:22, ...
4 years, 1 month ago (2016-10-21 23:05:25 UTC) #19
danakj
https://codereview.chromium.org/2433773005/diff/40001/base/synchronization/waitable_event_win.cc File base/synchronization/waitable_event_win.cc (right): https://codereview.chromium.org/2433773005/diff/40001/base/synchronization/waitable_event_win.cc#newcode83 base/synchronization/waitable_event_win.cc:83: TimeTicks target_time = TimeTicks::Now() + max_time; On 2016/10/21 23:05:25, ...
4 years, 1 month ago (2016-10-21 23:15:26 UTC) #20
stanisc
OK, I have added TimedWaitUntil which solves the problem with extra Now() calls. It looks ...
4 years, 1 month ago (2016-11-11 03:50:48 UTC) #30
stanisc
Please take a look
4 years, 1 month ago (2016-11-16 22:07:00 UTC) #33
danakj
https://codereview.chromium.org/2433773005/diff/100001/base/message_loop/message_pump_default.cc File base/message_loop/message_pump_default.cc (left): https://codereview.chromium.org/2433773005/diff/100001/base/message_loop/message_pump_default.cc#oldcode84 base/message_loop/message_pump_default.cc:84: } else { Can u explain why the if ...
4 years, 1 month ago (2016-11-16 22:57:29 UTC) #34
stanisc
https://codereview.chromium.org/2433773005/diff/100001/base/message_loop/message_pump_default.cc File base/message_loop/message_pump_default.cc (left): https://codereview.chromium.org/2433773005/diff/100001/base/message_loop/message_pump_default.cc#oldcode84 base/message_loop/message_pump_default.cc:84: } else { On 2016/11/16 22:57:29, danakj wrote: > ...
4 years, 1 month ago (2016-11-17 19:42:23 UTC) #39
danakj
https://codereview.chromium.org/2433773005/diff/100001/base/synchronization/waitable_event_win.cc File base/synchronization/waitable_event_win.cc (right): https://codereview.chromium.org/2433773005/diff/100001/base/synchronization/waitable_event_win.cc#newcode116 base/synchronization/waitable_event_win.cc:116: base::ThreadRestrictions::AssertWaitAllowed(); On 2016/11/17 19:42:22, stanisc wrote: > On 2016/11/16 ...
4 years, 1 month ago (2016-11-17 21:11:08 UTC) #40
stanisc
4 years, 1 month ago (2016-11-18 02:12:41 UTC) #43
stanisc
https://codereview.chromium.org/2433773005/diff/100001/base/synchronization/waitable_event_win.cc File base/synchronization/waitable_event_win.cc (right): https://codereview.chromium.org/2433773005/diff/100001/base/synchronization/waitable_event_win.cc#newcode116 base/synchronization/waitable_event_win.cc:116: base::ThreadRestrictions::AssertWaitAllowed(); On 2016/11/17 21:11:08, danakj wrote: > On 2016/11/17 ...
4 years, 1 month ago (2016-11-18 02:13:47 UTC) #44
stanisc
Please take another look when you have time.
4 years ago (2016-11-22 19:56:42 UTC) #47
danakj
LGTM https://codereview.chromium.org/2433773005/diff/100001/base/message_loop/message_pump_default.cc File base/message_loop/message_pump_default.cc (left): https://codereview.chromium.org/2433773005/diff/100001/base/message_loop/message_pump_default.cc#oldcode84 base/message_loop/message_pump_default.cc:84: } else { On 2016/11/17 19:42:22, stanisc wrote: ...
4 years ago (2016-11-29 02:46:45 UTC) #48
stanisc
https://codereview.chromium.org/2433773005/diff/140001/base/synchronization/waitable_event_posix.cc File base/synchronization/waitable_event_posix.cc (right): https://codereview.chromium.org/2433773005/diff/140001/base/synchronization/waitable_event_posix.cc#newcode160 base/synchronization/waitable_event_posix.cc:160: bool WaitableEvent::TimedWait(const TimeDelta& max_delta) { On 2016/11/29 02:46:45, danakj ...
4 years ago (2016-11-29 22:33:21 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2433773005/160001
4 years ago (2016-11-30 18:25:40 UTC) #60
commit-bot: I haz the power
Committed patchset #8 (id:160001)
4 years ago (2016-11-30 19:56:40 UTC) #63
commit-bot: I haz the power
4 years ago (2016-11-30 20:00:27 UTC) #65
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/acf6801129dff3dba81f6f105713aab173a73e2c
Cr-Commit-Position: refs/heads/master@{#435388}

Powered by Google App Engine
This is Rietveld 408576698