[ 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)