Skip to content

Conversation

franz1981
Copy link
Contributor

No description provided.

@franz1981
Copy link
Contributor Author

@vietj Still not sure about the added test: I was expecting it to cause some external unpark, while it doesn't seem the case

scheduler.execute(() -> {
inThread.set(true);
var current = Thread.currentThread();
inThread.add(current);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I adopted this fix separately in my fork, it's an essential one

* Run a task on a virtual thread
*/
public void run(Handler<Void> task) {
assert !Thread.currentThread().isVirtual();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually expect to be able to call .run from a virtual thread all the time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants