[Webkit-unassigned] [Bug 30612] Race condition in WorkerRunLoop::postTaskForMode

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 23 10:58:16 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=30612





--- Comment #1 from Dmitry Titov <dimich at chromium.org>  2009-10-23 10:58:16 PDT ---
So the easy fix would be to make WorkerRunLoop::Task ThreadSafeShared. However,
the pattern of usage of MessageQueue in all places (workers, localstore,
database) is that we create a task, append it to the MQ, which signals to other
thread. The signaled thread takes the task from the queue, runs it and discards
it.
This is straight scenario for OwnPtr/PassOwnPtr because at no moment in time
there are multiple owners of the tasks, the ownership is passed very cleanly
from one thread to another.
So we can stop deriving all kind of task classes from ThreadSafeShared and
change MessageQueue to take ownership of a task on append and pass it to the
fetching thread later. This will remove quite a lot of unnecessary thread-safe
refcounting.
Patch is forthcoming.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list