Bug 158208 - Add templated form of RunLoop::dispatch for posting cross thread tasks
Summary: Add templated form of RunLoop::dispatch for posting cross thread tasks
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 158207 158215
Blocks:
  Show dependency treegraph
 
Reported: 2016-05-30 09:11 PDT by Brady Eidson
Modified: 2016-06-01 09:34 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2016-05-30 09:11:30 PDT
Add thread-safety warning to RunLoop::dispatch to tasks posted from a different thread.

This safety warning can eventually become an ASSERT or other hard failures.

After the safety warning is in place, we will add a new templated function for dispatching cross thread tasks that will use CrossThreadCopier (https://bugs.webkit.org/show_bug.cgi?id=158207)
Comment 1 Brady Eidson 2016-05-30 09:15:15 PDT
Retitling:
Add templated form of RunLoop::dispatch for posting cross thread tasks

Figured it doesn't make sense to add the warning before adding the alternative to resolve it.

In fact, maybe the warning comes later.

I'll see how big the patches get once I'm working on this.
Comment 2 Brady Eidson 2016-05-31 18:36:26 PDT
Doing this the way I was originally envisioning turned out to be impossible (or at least difficult beyond my ability to figure out)

I'm looking at some alternatives.
Comment 3 Brady Eidson 2016-06-01 09:34:11 PDT
Do to the general lack of introspection and templatization of lambdas, I currently don't think there's a great solution to this.

Will leave the bug open because it's something we should do once able.