forked from WebKit/WebKit-http
-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WorkQueueGeneric's platformInvalidate() can deadlock when called on t…
…he RunLoop's thread https://bugs.webkit.org/show_bug.cgi?id=166645 Reviewed by Carlos Garcia Campos. Source/WTF: WorkQueue can be destroyed on its invoking thread itself. The scenario is the following. 1. Create WorkQueue (in thread A). 2. Dispatch a task (in thread A, dispatching a task to thread B). 3. Deref in thread A. 4. The task is executed in thread B. 5. Deref in thread B. 6. The WorkQueue is destroyed, calling platformInvalidate in thread B. In that case, if platformInvalidate waits thread B's termination, it causes deadlock. We do not need to wait the thread termination. * wtf/WorkQueue.h: * wtf/generic/WorkQueueGeneric.cpp: (WorkQueue::platformInitialize): (WorkQueue::platformInvalidate): Tools: * TestWebKitAPI/Tests/WTF/WorkQueue.cpp: (TestWebKitAPI::TEST): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@210271 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
3 changed files
with
35 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters