Benjamin Mahler created MESOS-4729:
--------------------------------------
Summary: Support 'delay' calls to direct or deferred functions.
Key: MESOS-4729
URL: https://issues.apache.org/jira/browse/MESOS-4729
Project: Mesos
Issue Type: Improvement
Components: libprocess
Reporter: Benjamin Mahler
Currently the {{delay}} primitive in libprocess can only be called for a member
function of a Process, and will execute in that Process' execution context.
However, we may want to delay to an unspecified execution context (handled by
libprocess) or direct functions, in the same way that defer supports these use
cases:
{code}
// Execute directly from the timeout completion context.
delay(timeout, () { exit(1); });
// Execute within a deferred execution context.
// Libprocess will manage callback executions (currently handled
// via a single Executor [1]).
delay(timeout, defer(() { exit(1); }));
{code}
\[1\] [Libprocess callback Executor|
https://github.com/apache/mesos/blob/0.27.0/3rdparty/libprocess/include/process/executor.hpp#L25-L66]
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)