Bug 126313

Summary: Stop using ThreadCondition in BlockAllocator
Product: WebKit Reporter: Anders Carlsson <andersca>
Component: New BugsAssignee: Anders Carlsson <andersca>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch sam: review+

Description Anders Carlsson 2013-12-30 16:40:13 PST
Stop using ThreadCondition in BlockAllocator
Comment 1 Anders Carlsson 2013-12-30 16:41:36 PST
Created attachment 220136 [details]
Patch
Comment 2 Anders Carlsson 2013-12-30 17:14:57 PST
Created attachment 220138 [details]
Patch
Comment 3 Anders Carlsson 2013-12-30 17:18:38 PST
Committed r161161: <http://trac.webkit.org/changeset/161161>
Comment 4 Alexey Proskuryakov 2013-12-30 22:53:40 PST
Rolled out with the rest of today's threading fixes, which broke WebKit2 on Mountain Lion.

I don't know if this particular change caused any trouble - there was so much churn today that I could't tell which patch caused which badness. Perhaps we should simply re-land if we can get EWS green.

I think that r161163 was a follow-up fix to this.
Comment 5 Filip Pizlo 2014-01-01 09:52:07 PST
Comment on attachment 220138 [details]
Patch

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

> Source/JavaScriptCore/heap/BlockAllocator.cpp:106
> +    std::unique_lock<std::mutex> lock(m_emptyRegionConditionMutex);

Why is this a unique_lock instead of lock_guard?
Comment 6 Anders Carlsson 2014-01-06 11:12:55 PST
(In reply to comment #5)
> (From update of attachment 220138 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=220138&action=review
> 
> > Source/JavaScriptCore/heap/BlockAllocator.cpp:106
> > +    std::unique_lock<std::mutex> lock(m_emptyRegionConditionMutex);
> 
> Why is this a unique_lock instead of lock_guard?

Unique locks are used together with std::condition_variable.
Comment 7 Anders Carlsson 2014-01-20 11:27:19 PST
Committed r162362: <http://trac.webkit.org/changeset/162362>