-
Notifications
You must be signed in to change notification settings - Fork 38
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
Rework handle_while #83
Conversation
# Conflicts: # examples/interleaved_messages.rs
There's also a minor internal spelling error fix in here which can be extracted if needed. |
@@ -341,12 +343,115 @@ impl<A: Actor> Context<A> { | |||
let mut addr_recv = addr_rx.recv_async(); | |||
let mut broadcast_recv = broadcast_rx.recv_async(); | |||
|
|||
loop { | |||
while self.running == RunningState::Running { | |||
let (next_msg, unfinished) = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is currently a lot of code duplication, but hopefully if #85 makes it in it should be able to be simplified quite a lot
Some tests for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK
Borrowing existing ecosystem terminology here is definitely a plus.
Ready for merge? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
* Remove stopping and repurpose KeepRunning * Fix build - logic will be fixed in #83 * Change stop_all behaviour - in line with stop_self Previously, stop_all would immediately disconnect the address. However, stop_self done on every actor would actually not do this in one case - if there were a free-floating (not executing an actor event loop) Context. This change brings stop_all in line with stop_self. * Fmt + document more breaking changes * merge oversight
This PR renames
handle_while
tojoin
, fixing a potential issue that would cause slight inefficiency if the actor is stopped during handling. It also addsselect
as a counterpart, which is likejoin
but will return early if the actor is stopped.