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

Add Fiber scheduler hooks for Kernel.sleep #1287

Merged
merged 8 commits into from
Oct 14, 2023

Conversation

herwinw
Copy link
Member

@herwinw herwinw commented Oct 1, 2023

This will be my work in progress for the coming time. I've gotten a very primitive (and incomplete) scheduler that switches Fibers in MRI. Next up is calling the scheduler from within Natalie, and we'll have our first actual checkbox for #1184.

@herwinw herwinw force-pushed the fiber_scheduler_sleep branch from d0d93c9 to 73784d4 Compare October 2, 2023 07:21
@herwinw herwinw self-assigned this Oct 2, 2023
@herwinw herwinw mentioned this pull request Oct 5, 2023
@herwinw herwinw force-pushed the fiber_scheduler_sleep branch 2 times, most recently from 117b3d5 to edef311 Compare October 11, 2023 07:39
@herwinw herwinw force-pushed the fiber_scheduler_sleep branch from a920899 to af6f100 Compare October 13, 2023 17:18
@herwinw herwinw force-pushed the fiber_scheduler_sleep branch from af6f100 to 340b4c1 Compare October 13, 2023 17:24
The test includes a very primitive Fiber scheduler. This one will
probably be extended in future tests.
This pattern does not work as expected in Natalie, see
natalie-lang#1337 for the bug report.
@herwinw herwinw force-pushed the fiber_scheduler_sleep branch 2 times, most recently from cbe765f to 12f9897 Compare October 14, 2023 04:54
@herwinw herwinw force-pushed the fiber_scheduler_sleep branch from 12f9897 to e9b7b8a Compare October 14, 2023 04:55
@herwinw herwinw removed their assignment Oct 14, 2023
@herwinw herwinw marked this pull request as ready for review October 14, 2023 09:54
@herwinw
Copy link
Member Author

herwinw commented Oct 14, 2023

This should do it. In hindsight I should have started with the limitless sleep, since most of the code is converting timestamps from and to various representations.

@seven1m
Copy link
Member

seven1m commented Oct 14, 2023

So cool!!! 😎

@seven1m seven1m merged commit be285d3 into natalie-lang:master Oct 14, 2023
@herwinw herwinw mentioned this pull request Oct 14, 2023
5 tasks
@herwinw herwinw deleted the fiber_scheduler_sleep branch October 14, 2023 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants