forked from jruby/jruby
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This cleans up how blocking works and fixes small parts of the scheduler dispatch logic. Fibers start out nonblocking by default, which means entering such a fiber puts the system in a schedulable state (decrements root fiber's default blocking count of 1 to 0). While schedulable, blocking calls will redispatch into the scheduler to give it a chance to handle the blocking operation and optionally transfer to another unblocked fiber. The handling of blocking and unblocking will require some additional work, since currently only a fiber yielding can unblock its parent, but we are getting the pieces wired up. All of CRuby's test/fiber/test_scheduler.rb passes with these changes.
- Loading branch information
Showing
4 changed files
with
86 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters