[mojo-sdk] Make callbacks more thread-safe-ish. |
||||
Issue descriptionmojo::Callbacks are difficult to use with posted tasks because they're not thread-safe in any way. For usability reasons, we need to reconsider this. At the very least, make copying (and by extension, destruction) safe.
,
Mar 18 2016
,
Mar 18 2016
,
Mar 21 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/314a150a7a17639873137ba079a4a26785242273 commit 314a150a7a17639873137ba079a4a26785242273 Author: amistry <amistry@chromium.org> Date: Mon Mar 21 19:16:41 2016 Make mojo::Callback safe to copy across threads and destroy on any thread. This brings the behaviour of mojo::Callback close to that of base::Callback. BUG= 595939 Review URL: https://codereview.chromium.org/1819463002 Cr-Commit-Position: refs/heads/master@{#382349} [modify] https://crrev.com/314a150a7a17639873137ba079a4a26785242273/mojo/public/cpp/bindings/callback.h [modify] https://crrev.com/314a150a7a17639873137ba079a4a26785242273/mojo/public/cpp/bindings/lib/interface_endpoint_client.cc [modify] https://crrev.com/314a150a7a17639873137ba079a4a26785242273/mojo/public/cpp/bindings/lib/router.cc [modify] https://crrev.com/314a150a7a17639873137ba079a4a26785242273/mojo/public/cpp/bindings/message.h [modify] https://crrev.com/314a150a7a17639873137ba079a4a26785242273/mojo/public/cpp/bindings/tests/binding_callback_unittest.cc [modify] https://crrev.com/314a150a7a17639873137ba079a4a26785242273/mojo/public/tools/bindings/generators/cpp_templates/interface_definition.tmpl
,
Mar 21 2016
This is fixed, but it does raise the question of just switching to base::Callback. I've created crbug.com/596521 to track that. |
||||
►
Sign in to add a comment |
||||
Comment 1 by ortuno@chromium.org
, Mar 18 2016