Open
Bug 486442
Opened 15 years ago
Updated 2 years ago
Will probably soon want a barrier synchronization primitive
Categories
(Core :: XPCOM, enhancement)
Core
XPCOM
Tracking
()
NEW
People
(Reporter: cjones, Unassigned)
References
Details
Attachments
(1 file)
12.30 KB,
patch
|
Details | Diff | Splinter Review |
Due to the nature of some new projects being explored, it's probably only a matter of time until we need an nsBarrier. These usually come up in situations where parallelism is used at a fairly fine grain for performance, rather than responsiveness, as we mostly do now. Here's a reasonable API: nsBarrier(int count); ~nsBarrier(); /** When |count| threads arrive, all are woken up and continue. Any thread * arriving before then is stalled. */ void Wait(); Barriers can be easily implemented on top of monitors, but this is not the most efficient way. This is very low priority.
Reporter | ||
Comment 1•15 years ago
|
||
Attachment #409456 -
Flags: review?(benjamin)
Reporter | ||
Updated•15 years ago
|
Assignee: nobody → jones.chris.g
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 2•15 years ago
|
||
Comment on attachment 409456 [details] [diff] [review] v1 Barrier.h doesn't have any comments at all explaining how you'd use it, which seems like a basic prerequisite for reviewing this patch. I'd like to understand who would normally wait on a barrier... wouldn't it just be one thread waiting? Why do we use notifyall?
Attachment #409456 -
Flags: review?(benjamin)
Reporter | ||
Comment 3•15 years ago
|
||
Since this patch is only for bug 520942, it's probably better to keep the Barrier private to that code until we need it elsewhere.
Reporter | ||
Comment 4•13 years ago
|
||
We'll want this for parallel selector matching. David, what bug should we set this to block?
Reporter | ||
Updated•11 years ago
|
Assignee: jones.chris.g → nobody
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•