Skip to content

Conversation

kelunik
Copy link
Member

@kelunik kelunik commented Oct 16, 2021

This ensures it's safe to call any code within EventLoop::queue callbacks by executing callbacks in an extra fiber instead of directly from the event loop fiber.

Driver::interrupt has been added to allow the Suspension class to still suspend the event loop fiber itself to continue with {main}.

@kelunik kelunik requested a review from trowski October 16, 2021 19:52
This ensures it's safe to call any code within EventLoop::queue callbacks by executing callbacks in an extra fiber instead of directly from the event loop fiber.

Driver::interrupt has been added to allow the Suspension class to still suspend the event loop fiber itself to continue with {main}.
@kelunik kelunik merged commit 45ced59 into main Oct 16, 2021
@kelunik kelunik deleted the interrupt branch October 16, 2021 20:11
@kelunik kelunik mentioned this pull request Oct 17, 2021
digitaltim-de added a commit to digitaltim-de/event-loop that referenced this pull request Jan 26, 2025
Fatal error: Uncaught FiberError: Cannot suspend in a force-closed fiber in /srv/app/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php:441 Stack trace: #0 /srv/app/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(441): Fiber::suspend(Object(stdClass)) revoltphp#1 /srv/app/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(567): Revolt\EventLoop\Internal\AbstractDriver->invokeMicrotasks() revoltphp#2 [internal function]: Revolt\EventLoop\Internal\AbstractDriver->Revolt\EventLoop\Internal\{closure}() revoltphp#3 {main} thrown in /srv/app/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php on line 441
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants