RFR: 8289613: Drop use of Thread.stop in jshell [v4]

Jan Lahoda jlahoda at openjdk.org
Wed Sep 7 18:37:43 UTC 2022


On Wed, 7 Sep 2022 18:22:21 GMT, Alan Bateman <alanb at openjdk.org> wrote:

> Would it be possible to summarize how the loader delegate work in jshell? Instrumenting the code to invoke REPL/$Cancel$.stopCheck looks reasonable but I can't immediately see how the generated REPL/$Cancel$ has access to LocalExecutionControl.allStop.

Not sure what you mean - as far as I can tell, neither the generated class, nor the snippets access `LocalExecutionControl.allStop`. The snippets only access the generated class, and `LocalExecutionControl` sets the cancelled value into the generated class. And there is no problem accessing the generated class, as it is in the unnamed module and public.

-------------

PR: https://git.openjdk.org/jdk/pull/10166


More information about the core-libs-dev mailing list