-
-
Notifications
You must be signed in to change notification settings - Fork 561
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
feat(rust): improve ockam_node #8718
feat(rust): improve ockam_node #8718
Conversation
d623ed3
to
483a9e1
Compare
3b8a913
to
0572200
Compare
@@ -4,5 +4,3 @@ pub mod common; | |||
pub mod session; | |||
#[allow(dead_code)] | |||
pub mod test_spans; | |||
#[allow(dead_code)] |
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.
@etorreborre is it ok to delete it? It looks unused
6953d64
to
af1e201
Compare
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.
Looks good!
Everything can be addressed in a follow-up
} | ||
} | ||
}, | ||
result = ctrl_rx.recv() => { | ||
if result.is_some() { |
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.
Was this a bug?
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.
Could you please elaborate?
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.
You removed if result.is_some() {
, and result
comes from the previous select!{} condition result = self.recv_message() => {
, was this preventing a relay shutdown?
15bab15
to
ff4e120
Compare
ff4e120
to
139f38c
Compare
ctx.stop_worker()
,ctx.stop_processor()
->ctx.stop_address()
ctx.stop()
->ctx.shutdown_node()
node.stop()
->node.shutdown()
Weak<Router>
for clearer ownership over Router, which helps to drop it earlier and in more predictable way. E.g., detached Context will no longer keep Router from running => we can shutdown the environment successfully and then detached Context instances that are left can be dropped safely considering they no longer has access to the Router.AsyncTryClone
. Cloning Context type became sync, so we no longer need AsyncTryClone. Still needed failable clone, so replaced withTryClone
Possible future improvements: