Benjamin Bannier created MESOS-8542:
---------------------------------------
Summary: libprocess' dispatch and defer and not very symmetric
Key: MESOS-8542
URL: https://issues.apache.org/jira/browse/MESOS-8542
Project: Mesos
Issue Type: Bug
Components: libprocess
Reporter: Benjamin Bannier
>From a high level, libprocess {{dispatch}} and {{defer}} perform closely
>related jobs. They both enqueue some work on a libprocess actor. They differ
>semantically in that {{dispatch}} enqueues work to be executed after currently
>enqueued work while {{defer}} effectively performs a {{dispatch}} of a future
>{{dispatch}}.
While these functions are semantically very close, they often cannot be used in
each other's place. If e.g., a function expects some function object, {{defer}}
can be used (since it returns a {{Deferred}} or similar object which can be
invoked), but one cannot use {{dispatch}} which for most overloads just returns
{{void}}.
We should rectify this asymmetry to make sure that {{dispatch}} can be used in
all places where currently {{dispatch}} can be used syntactically. Depending on
the chosen implementation strategy this might allow us to implement a lot of
the functionality from {{defer}} with {{dispatch}}.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)