File tree Expand file tree Collapse file tree
core/src/main/java/io/netty/loom Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,6 +37,9 @@ public void onStart(Thread.VirtualThreadTask virtualThreadTask) {
3737 // TODO this is not great for 2 reasons:
3838 // 1. we are doing a remove on a concurrent map even for v threads which are not really interesting to us
3939 // 2. if a vThread will never start, it will leak here forever
40+ // HINT: if we had a VirtualThreadTask::Of(VirtualThread) method, we could perform the assignment BEFORE calling this
41+ // on the vThread factory
42+ // or the vThreadFactory could provide in its build method something to access the VirtualThreadTask of an unstarted VirtualThread
4043 var assignedSchedulerRef = unstartedThreads .remove (virtualThreadTask .thread ());
4144 if (assignedSchedulerRef == null ) {
4245 // Read-Poller threads are special: if we run from a VThread managed by a VirtualThreadNettyScheduler,
You can’t perform that action at this time.
0 commit comments