-
Notifications
You must be signed in to change notification settings - Fork 538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an overload to monitor
that calls a lambda in the context of self
#1423
Comments
As mentioned in the stashing ticket: I lean towards removing the special handlers altogether. So for this ticket, this would mean using your new For the deprecation cycle, I think we can define the old void monitor(const actor_addr& whom) {
monitor(whom, down_handler_);
}
FYI, actions are disposables. You can simply call |
@riemass we'll also need |
Here's an update:
Right now, disposing the returned |
Since this is closely tied to the I/O module, we'll postpone this API. We currently don't know how a The new callback-based |
This feature request was discussed in Gitter1.
To make our code more composable and to express concerns more locally, I am looking for a mechanism that allows me to add a lambda to
self->monitor(dest)
as an additional parameter.The implementation for this probably looks something like this:
Ideally the function returns a
disposable
to use the new mechanism for cancelling, and there are probably better ways to express this without going throughattach_functor
to avoid the additional indirection.I think the advantages over the current
monitor
anddemonitor
APIs are very obvious, especially if—as discussed in Gitter1—down messages may still arrive after demonitoring an actor.There are two follow-up questions for this, assuming this gets implemented:
monitor
,demonitor
, andset_down_handler
APIs get deprecated for this, orFootnotes
https://app.gitter.im/#/room/#actor-framework_chat:gitter.im/$2oP8-OPG92oBdZ49SwZKJ_Ze6PeZWcN9pXgjS5XN_mE ↩ ↩2
The text was updated successfully, but these errors were encountered: