nervosnetwork / fiber

15 stars 8 forks source link

Refactoring actor event handling to avoid blocking actor message queue #119

Open doitian opened 2 months ago

doitian commented 2 months ago

Async function means that this code snippet will not block current thread, but this will still make the actor unable to process any other messages unrelated to this one, e.g. other SendBtc messages. This is because the function handle of this actor has still not returned, thus we have no chance to handle any other messages queued in the mailbox.

_Originally posted by @contrun in https://github.com/nervosnetwork/cfn-node/pull/46#discussion_r1659247148_