Skip to content

Which scheduler should be used to enable fibers using virtual threads to run preemptively concurrently? #7365

Answered by headius
mattwelke asked this question in Q&A
Discussion options

You must be logged in to vote

Which scheduler should be used to enable fibers using virtual threads

I'm not sure about the answer to this question, but JRuby does not yet implement the scheduler interface in either JRuby 9.3 or 9.4. You would want to be targeting 9.4, though, since that is the 3.0/3.1-compatible release. Nightly snapshots are available and hopefully we will have a release out soon (ideally with the scheduler interface finished, but maybe not).

what is it about JRuby that allows it to handle its own fiber scheduling

Well, currently we are just falling back on the default JDK vthread scheduler by creating simple Thread.ofVirtual instances. It appears to schedule them correctly, but of course we are …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mattwelke
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants