Skip to content
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

Fix min_by? in IOCP event loop #run_once #14394

Conversation

straight-shoota
Copy link
Member

min_by raises if the queue is empty but we want to handle this case explicitly in the following condition.

This is practically not very relevant as the queue should never be empty in normal operation. But it might be useful when working on the event loop itself.

`min_by` raises if the queue is empty but we want to handle this case
explicitly in the following condition.
@straight-shoota straight-shoota added this to the 1.12.0 milestone Mar 25, 2024
@ysbaddaden
Copy link
Contributor

The current Crystal::Scheduler happen to always have an event in the event loop, but that may not be true in the future anymore (e.g. RFC #2).

@straight-shoota straight-shoota merged commit d2cf45e into crystal-lang:master Mar 26, 2024
58 checks passed
@straight-shoota straight-shoota deleted the fix/iocp-event-loop-min_by branch March 26, 2024 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants