You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Benjamin Bannier (JIRA)" <ji...@apache.org> on 2016/09/05 13:49:20 UTC
[jira] [Assigned] (MESOS-5631) Implement clang-tidy check for
incorrect use of capturing lambdas with Futures
[ https://issues.apache.org/jira/browse/MESOS-5631?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benjamin Bannier reassigned MESOS-5631:
---------------------------------------
Assignee: Benjamin Bannier
> Implement clang-tidy check for incorrect use of capturing lambdas with Futures
> ------------------------------------------------------------------------------
>
> Key: MESOS-5631
> URL: https://issues.apache.org/jira/browse/MESOS-5631
> Project: Mesos
> Issue Type: Improvement
> Reporter: Benjamin Bannier
> Assignee: Benjamin Bannier
>
> When one enqueues capturing lambdas to a {{Future}} with {{then}} or the {{onXXX}} variations, in general any actor might execute that callback (no constraints imposed per se).
> This can lead to hard to understand dependencies or bugs if the lambda needs to access external state (i.e. anything it captures by references/pointer to instead of by value); instead such callbacks should always be constraint to a specific actor with {{dispatch}}/{{defer}} to ensure the pointed to data isn't modified in a concurrent thread.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)