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
Unit tests fail to work on the code where scoped_actor is involved. I tried to add sched.inline_all_enqueues() before, but it still didn't work. Is there any way to make the scheduler run? The sample code is as follows. Thank you a lot.
Thanks for providing the minimal example. I've reproduced the issue and I've implemented a patch. If the PR gets merged, I'll also provide the patch in the branch topic/0.17.4 (using the master branch is currently not a good idea, since it contains some breaking changes and more are coming for the upcoming 0.18 release).
However, please note that using a scoped actor inside an event-based actor is not safe. Event-based actors are scheduled cooperatively, this means they are supposed to "play nice" with each other.
The scheduler waits for the actor to return from its message handler before it can run other actors. Blocking a scheduler thread can degrade performance and cause starvation or even deadlocks.
Please consider using self->request().then/await instead or switch to using blocking actors instead if you really need a blocking receive.
Neverlord
changed the title
test_coordinator_fixture's scheduler suspended in blocking actor.
inline_all_enqueues not working as expected
Jan 18, 2020
Unit tests fail to work on the code where scoped_actor is involved. I tried to add
sched.inline_all_enqueues()
before, but it still didn't work. Is there any way to make the scheduler run? The sample code is as follows. Thank you a lot.The text was updated successfully, but these errors were encountered: