Closed He-Pin closed 3 weeks ago
This is probably useful but I would appreciate if we don't merge it until after 1.1.0-M1 is released. I think there are some changes that we need in the implementation and we have to work out how to test it.
I don't think this dispatcher should be the default, even if you use JDK 21+. Users should only be able to opt in to using it.
Dispatchers are pluggable so users can create their own dispatcher for this while they are waiting for us to release one.
Yes, I would like to make it in 1.1.0 M2 or M3 , Need more time to polish it.
@pjfanning @alexandru @Roiocam @alexandru What do you think about the current way to support virtual thread in pekko? I was want to replace the virtual thread's shceudler, but that need a methodHandler method in Java 9+.
Could you add a basic unit test?
@He-Pin would you have time to add a test that runs when we build with java 21+? And there is my comment about using MethodHandles publicLookup instead of lookup. Generally, I support adding this. I'm hoping to try to get the final changes merged so that we can press ahead with Pekko 1.1.0 or 1.1.0-M2 release.
I'm a little busy at work but I would like to address this this weekend night, at day I need go to the apache coc in HangZhou.
Motivation: Add virtual thread support
Modification:
ThreadPerTaskExecutor
.Result: Virtual thread support was added.
Note: As
Mailbox
extends onForkJoinTask
and when we run onThreadPerTaskExecutor
, it's pointless.