|
7 | 7 | /** |
8 | 8 | * Global Netty scheduler proxy for virtual threads. |
9 | 9 | * |
10 | | - * <p>Exact inheritance rule: a newly started virtual thread will inherit the |
11 | | - * caller's {@code EventLoopScheduler} only when both of the following are true: |
12 | | - * <ul> |
| 10 | + * <p>Inheritance rule (exact): a newly started virtual thread inherits the |
| 11 | + * caller's {@code EventLoopScheduler} only when both conditions are true: |
| 12 | + * <ol> |
13 | 13 | * <li>{@code jdk.pollerMode} is {@code 3} (per-carrier pollers); and</li> |
14 | | - * <li>the thread performing the start/poller I/O is itself run by an |
15 | | - * {@code EventLoopScheduler} (i.e. the current thread's |
16 | | - * {@code EventLoopScheduler.currentThreadSchedulerContext().scheduler()} is |
17 | | - * non-null).</li> |
18 | | - * </ul> |
| 14 | + * <li>the thread performing the start/poller I/O is itself running under an |
| 15 | + * {@code EventLoopScheduler} (i.e. {@code EventLoopScheduler.currentThreadSchedulerContext().scheduler()} |
| 16 | + * returns a non-null {@code SharedRef}).</li> |
| 17 | + * </ol> |
19 | 18 | * |
20 | | - * <p>If either condition is false the virtual thread does not inherit an |
21 | | - * {@code EventLoopScheduler} and falls back to the default JDK scheduler. |
| 19 | + * <p>The current implementation only attempts scheduler inheritance for |
| 20 | + * poller-created virtual threads (recognized by the {@code "-Read-Poller"} |
| 21 | + * name suffix). If either condition above is not met (or the thread kind is |
| 22 | + * unrecognized) the virtual thread falls back to the default JDK scheduler. |
22 | 23 | * |
23 | | - * <p>Implementation note: the current implementation attempts inheritance only |
24 | | - * for poller-created virtual threads (recognized by the {@code "-Read-Poller"} |
25 | | - * name suffix). |
26 | | - * |
27 | | - * <p>This class is a proxy/dispatcher; see {@link EventLoopScheduler} for |
28 | | - * details about scheduler attachment and execution. |
| 24 | + * <p>This class is a proxy/dispatcher and does not implement a standalone |
| 25 | + * scheduling policy. See {@link EventLoopScheduler} for details about scheduler |
| 26 | + * attachment and execution. |
29 | 27 | */ |
30 | 28 |
|
31 | 29 | public class NettyScheduler implements Thread.VirtualThreadScheduler { |
|
0 commit comments