Open
Bug 1524072
Opened 5 years ago
Updated 10 months ago
remove chromium's WaitableEvent code
Categories
(Core :: IPC, enhancement, P1)
Core
IPC
Tracking
()
NEW
People
(Reporter: froydnj, Unassigned)
References
Details
Attachments
(4 files)
2.03 KB,
patch
|
jld
:
review+
|
Details | Diff | Splinter Review |
4.73 KB,
patch
|
jld
:
review+
|
Details | Diff | Splinter Review |
3.03 KB,
patch
|
jld
:
review+
|
Details | Diff | Splinter Review |
28.65 KB,
patch
|
jld
:
review+
|
Details | Diff | Splinter Review |
See the commit message for part 4 for why this seems like a reasonable thing to do.
Reporter | ||
Comment 1•5 years ago
|
||
There's no need for subclasses to be twiddling this variable, and it makes our life easier in the next patch.
Attachment #9040236 -
Flags: review?(jld)
Reporter | ||
Comment 2•5 years ago
|
||
This patch is complicated, but that's mostly because waiting for condition variables on timeouts is complicated if you want to be robust about it. This patch is also *possible* justification for keeping WaitableEvent, as the code with WaitableEvent is significantly nicer, but I think we're better off without WaitableEvent (and the Chromium lock code, see part 4).
Attachment #9040240 -
Flags: review?(jld)
Reporter | ||
Comment 3•5 years ago
|
||
Longer than using WaitableEvent, but less magical.
Attachment #9040241 -
Flags: review?(jld)
Reporter | ||
Comment 4•5 years ago
|
||
Chromium's WaitableEvent is, on Windows, a thin wrapper around Windows event objects. On POSIX systems, it's something rather more complicated. The primary advantages of it seem to be twofold: 1. You can wait on multiple events with ease. 2. It's shorter than using a monitor + boolean variable. The latter capability is not used in our codebase (and seems to only be rarely used in Chromium's present codebase). The latter advantage is certainly true, but the implementation of WaitableEvent on POSIX systems is complicated enough (and involves things like careful manipulation of lock acquisition/release in non-LIFO order) that it seems reasonable to just write out the monitor/boolean logic in the two places we use WaitableEvent. Previous patches have done just that, and this patch removes the now-unused WaitableEvent code. (Doing this also means that it's significantly easier to get rid of the Chromium lock code, as the POSIX WaitableEvent implementation was the last client of the Chromium lock code. Replacing the Chromium locks there with mozilla::Mutex was complicated by the aforementioned non-LIFO lock manipulation, as the deadlock detector was quite unhappy about said non-LIFO shenanigans.)
Attachment #9040242 -
Flags: review?(jld)
Updated•5 years ago
|
Priority: -- → P1
Updated•5 years ago
|
Attachment #9040236 -
Flags: review?(jld) → review+
Updated•5 years ago
|
Attachment #9040240 -
Flags: review?(jld) → review+
Updated•5 years ago
|
Attachment #9040241 -
Flags: review?(jld) → review+
Updated•5 years ago
|
Attachment #9040242 -
Flags: review?(jld) → review+
Comment 5•5 years ago
|
||
There are some r+ patches which didn't land and no activity in this bug for 2 weeks.
:froydnj, could you have a look please?
Flags: needinfo?(nfroyd)
Reporter | ||
Updated•5 years ago
|
Flags: needinfo?(nfroyd)
Updated•2 years ago
|
Assignee: froydnj+bz → nobody
Updated•2 years ago
|
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•