You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Capnproto interfaces are translated to traits with methods taking &mut self. So, from my understanding, there's an event loop taking the ownership of self, which receives RPC calls and then executes the correct methods.
Can we add a way to schedule a closure on that event loop, to get access to &mut self?
Something like this:
self.dispatch(|this:&mutSelf| async{});
The text was updated successfully, but these errors were encountered:
ranfdev
changed the title
Invoking private method on the event loop to get a mutable reference to self
Invoking closure on the event loop to get a mutable reference to self
Nov 14, 2023
This is somewhat similar to #87, which is about calling RPC methods on self. Off the top of my head, I'm not sure how to make all the types and traits work out, but it does seem like it should be possible.
Capnproto interfaces are translated to traits with methods taking
&mut self
. So, from my understanding, there's an event loop taking the ownership ofself
, which receives RPC calls and then executes the correct methods.Can we add a way to schedule a closure on that event loop, to get access to
&mut self
?Something like this:
The text was updated successfully, but these errors were encountered: