You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Yan Xu (JIRA)" <ji...@apache.org> on 2017/06/07 23:11:18 UTC
[jira] [Commented] (MESOS-7641) process::delay'd method may not be
canceled by canceling the returned timer
[ https://issues.apache.org/jira/browse/MESOS-7641?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16041867#comment-16041867 ]
Yan Xu commented on MESOS-7641:
-------------------------------
/cc [~bmahler]
> process::delay'd method may not be canceled by canceling the returned timer
> ----------------------------------------------------------------------------
>
> Key: MESOS-7641
> URL: https://issues.apache.org/jira/browse/MESOS-7641
> Project: Mesos
> Issue Type: Bug
> Reporter: Yan Xu
>
> It's a common pattern to use {{delay}} to dispatch work into a process at a later time: e.g., [Slave::doReliableRegistration|https://github.com/apache/mesos/blob/b882f66394be1047d6f8ed3136a05eb5fe1e3e8e/src/slave/slave.cpp#L972].
> {{delay}} returns a {{Timer}} and a {{Timer}} can be cancelled so its {{thunk}} won't be executed if it's still pending. However in the case of {{delay}}, the {{thunk}} is a [dispatch|https://github.com/apache/mesos/blob/b882f66394be1047d6f8ed3136a05eb5fe1e3e8e/3rdparty/libprocess/include/process/delay.hpp#L69] that could be already dispatched into the process {{pid}} and cancelling the timer wouldn't prevent this event from being executed.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)