Bug 148090

Summary: WTF::Condition should have a fast path for notifyOne/notifyAll that avoids calling unparkOne/unparkAll
Product: WebKit Reporter: Filip Pizlo <fpizlo>
Component: Web Template FrameworkAssignee: Filip Pizlo <fpizlo>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, basile_clement, benjamin, cmarcelo, commit-queue, ggaren, mark.lam, mhahnenb, mmirman, msaboff, nrotem, oliver, saam, sam
Priority: P2    
Version: Other   
Hardware: All   
OS: All   
Attachments:
Description Flags
the patch ggaren: review+

Description Filip Pizlo 2015-08-17 13:28:08 PDT
Patch forthcoming.
Comment 1 Filip Pizlo 2015-08-18 12:50:30 PDT
Created attachment 259291 [details]
the patch
Comment 2 WebKit Commit Bot 2015-08-18 12:53:18 PDT
Attachment 259291 [details] did not pass style-queue:


ERROR: Source/WTF/wtf/Condition.h:153:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 1 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Geoffrey Garen 2015-08-18 13:39:52 PDT
Comment on attachment 259291 [details]
the patch

View in context: https://bugs.webkit.org/attachment.cgi?id=259291&action=review

r=me

> Source/WTF/wtf/Condition.h:72
> +                    // Let everyone know that we will be waiting. Do this why we hold the queue lock,

why => while

> Source/WTF/wtf/Condition.h:167
> +        // guaranteed to then notifyAll() anyway. So, if there is a race with some thread calling

notifyAll => unparkAll.
Comment 4 Filip Pizlo 2015-08-18 14:29:46 PDT
(In reply to comment #3)
> Comment on attachment 259291 [details]
> the patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=259291&action=review
> 
> r=me
> 
> > Source/WTF/wtf/Condition.h:72
> > +                    // Let everyone know that we will be waiting. Do this why we hold the queue lock,
> 
> why => while
> 
> > Source/WTF/wtf/Condition.h:167
> > +        // guaranteed to then notifyAll() anyway. So, if there is a race with some thread calling
> 
> notifyAll => unparkAll.

Fixed, thanks!
Comment 5 Filip Pizlo 2015-08-18 15:36:00 PDT
Landed in http://trac.webkit.org/changeset/188605