Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POC =act Make use of externalSubmit to yield. #665

Closed
wants to merge 1 commit into from

Conversation

He-Pin
Copy link
Member

@He-Pin He-Pin commented Sep 20, 2023

refs: #661

Some previous work done by @jrudolph

The Current VirtualThrad in JDK 21 making use of the externalSubmit

if (s == YIELDING) {   // Thread.yield
            setState(RUNNABLE);

            // notify JVMTI that unmount has completed, thread is runnable
            notifyJvmtiUnmount(/*hide*/false);

            // external submit if there are no tasks in the local task queue
            if (currentThread() instanceof CarrierThread ct && ct.getQueuedTaskCount() == 0) {
                externalSubmitRunContinuation(ct.getPool());
            } else {
                submitRunContinuation();
            }
        }

I think this change will affect the performance.

@He-Pin He-Pin marked this pull request as draft September 20, 2023 17:53
@He-Pin He-Pin changed the title =act Make use of externalSubmit to yield. POC =act Make use of externalSubmit to yield. Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant