[Webkit-unassigned] [Bug 74535] [chromium] Add postCancellable[Delayed]Task to CCThread
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Dec 14 15:33:57 PST 2011
https://bugs.webkit.org/show_bug.cgi?id=74535
--- Comment #5 from Nat Duca <nduca at chromium.org> 2011-12-14 15:33:57 PST ---
(In reply to comment #4)
> I'd like to understand a bit more about the use cases for this. Would CCScopedThreadProxy work for this? That allows you to scope a set of tasks to a single proxy object and provides a guarantee that no tasks scoped to the proxy run after the proxy is destroyed.
>
> Another approach to things like this that Chromium takes is that tasks are associated with their target and take a reference to it.
I think this makes sense, as we discussed on IM last night. :)
This is for things like DelayBasedTimeSource, which you can see is using hand-coded cancelability. Animation stuff needs this too, which is why trchen is hitting this. This also wraps the notion of canceling a task, which has nice properties too.
The scopedthreadproxy is ~= Messageloopproxy in my head.
While technically, you can with some mental acrobatics say that one is the other, I think from an "intents" point of view, there are two different use-cases. Having a class designed specifically for the "cancellable work" is really convenient.
We might need to make cancel() threadsafe though.
--
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