[webkit-dev] Proposal and WIP implementation for refactoring cross thread communication

Kwonjin Jeong gram at company100.net
Mon Aug 13 05:26:23 PDT 2012

Hi, WebKit.

There are several implementations of threads, tasks and cross thread
communication. e.g. FileThread, DatabaseThread and StorageThread perform
blocking IO asynchronously and invoke callbacks using
ScriptExecutionContext. Each of these implementation is pretty similar, but
there is no code sharing at all.

So, my team at Company 100 is trying to refactor cross thread
communication. We wrote an API proposal and modified some thread code to
use our new API.

As the first step, we added two new abstractions for cross thread

1) TaskThread is our new abstraction for the task thread. FileThread,
DatabaseThread and other task threads reuse the code by inheriting from

2) We also added CrossThreadFunction. It's used to pass a task to the task
thread and invoke callbacks. CrossThreadFunction is similar to
WTF::Function but it has some additional features. e.g., cross-thread
parameter copying and ref counting.

Please refer to the following bug for details:


We welcome feedbacks on our work.


Kwonjin Jeong
Computer Scientist
Company 100, Inc.
Phone: +82-10-9528-2581
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20120813/28c23b83/attachment.html>

More information about the webkit-dev mailing list