<div dir="ltr"><p>Hello @loom-dev <loom-dev at <a href="http://openjdk.org">openjdk.org</a>>,</p>
<p>I have been enjoying the new POLLER_PER_CARRIER design in the Loom repo and I really like the direction it is going.<br>
While building on top of the latest code, I noticed a couple of issues and would like to ask for clarification.</p>
<ol>
<li>
<p>When calling <code>Thread.startVirtualThread</code>, the new virtual thread does not inherit the scheduler of the calling virtual thread, but instead uses <code>DEFAULT_SCHEDULER</code>. What is the reasoning behind this design? Could there be a mechanism to allow implicit inheritance? This would be very helpful for custom schedulers based on the per-core model.</p>
</li>
<li>
<p>The method <code>Thread.VirtualThreadScheduler::current</code> is very helpful, but it seems not quite enough. Since Loom already provides the read-only <code>builtin.externalView</code>, could we also have a method like <code>Thread.VirtualThreadScheduler::scheduler(Thread)</code>? This would make it easier to build better schedulers. For example, I could combine <code>Thread.currentThread</code> with <code>Thread.VirtualThreadScheduler.scheduler</code> to decide whether to push a task into a local task queue rather than the eventLoop’s MPSC queue.</p>
</li>
</ol>
<p>Thank you for your time and help.<br>
Best regards,<br>dreamlike li</p></div>