You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Vinod Kone (JIRA)" <ji...@apache.org> on 2015/01/28 02:35:34 UTC

[jira] [Updated] (MESOS-2279) Future callbacks should be cleared once the future has transitioned.

     [ https://issues.apache.org/jira/browse/MESOS-2279?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vinod Kone updated MESOS-2279:
------------------------------
          Sprint: Twitter Mesos Q1 Sprint 1
        Assignee: Vinod Kone
    Story Points: 2

https://reviews.apache.org/r/30348

> Future callbacks should be cleared once the future has transitioned.
> --------------------------------------------------------------------
>
>                 Key: MESOS-2279
>                 URL: https://issues.apache.org/jira/browse/MESOS-2279
>             Project: Mesos
>          Issue Type: Bug
>    Affects Versions: 0.21.0, 0.21.1
>            Reporter: Jie Yu
>            Assignee: Vinod Kone
>
> For example, when a future has transitioned into READY state, all onDiscard callbacks should be cleared to avoid potential cyclic dependency and memory leak. For instance:
> {noformat}
> Promise<Nothing> promise;
> Future<Nothing> f = promise.future();
> f.onDiscard(lambda::bind(&SomeFunc, f));
> promise.set(Nothing());
> {noformat}
> The above code has a cyclic dependency because f.data has a reference to the future inside an std::function which has a reference to f.data.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)