Bug 158208

Summary: Add templated form of RunLoop::dispatch for posting cross thread tasks
Product: WebKit Reporter: Brady Eidson <beidson>
Component: Web Template FrameworkAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: cdumez
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 158207, 158215    
Bug Blocks:    

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.