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

Change libevent event loop to wait forever when blocking #15243

Conversation

ysbaddaden
Copy link
Contributor

@ysbaddaden ysbaddaden commented Dec 3, 2024

Same as #14949 but with a twist: the libevent evloop no longer returns when it's empty (no queued events), so the behavior doesn't rely on the existence of the stack-pool-collector fiber repeatedly sleeping.

The Polling evloop already waits forever (when blocking) and IOCP will also with #15238.

edit: extracted drop fiber channel commit.

@HertzDevil
Copy link
Contributor

I believe you could now also drop the Windows interpreter-only idle loop in src/kernel.cr

@ysbaddaden
Copy link
Contributor Author

@HertzDevil That would be after #15238 won't it?

@straight-shoota
Copy link
Member

Could we separate this into two PRs?
libevent: wait forever when blocking can be merged right away while Drop Crystal::FiberChannel follows after that and #15238.

src/crystal/scheduler.cr Outdated Show resolved Hide resolved
@ysbaddaden ysbaddaden force-pushed the feature/evloop-libevent-block-forever branch from c002dff to 4a670f6 Compare December 3, 2024 14:45
@straight-shoota straight-shoota changed the title Drop FiberChannel + libevent#run blocks forever Change libevent event loop to wait forever when blocking Dec 3, 2024
@straight-shoota straight-shoota added this to the 1.15.0 milestone Dec 3, 2024
@straight-shoota straight-shoota merged commit 0580ff2 into crystal-lang:master Dec 4, 2024
69 checks passed
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.

4 participants