mesos-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Bannier (JIRA)" <j...@apache.org>
Subject [jira] [Created] (MESOS-5631) Implement clang-tidy check for incorrect use of capturing lambdas with Futures
Date Fri, 17 Jun 2016 07:56:05 GMT
Benjamin Bannier created MESOS-5631:
---------------------------------------

             Summary: 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


When one enqueues capturing lambdas to a {{Future}} with {{then}} or then {{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)

Mime
View raw message