<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Correct.
<div class="">However, we might introduce other (safe) constructs internally employing Continuation under the hood.</div>
<div class=""><br class="">
</div>
<div class="">The main issue is that the Continuation class can be used in a way that would cause the current thread (i.e. Thread.currentThread()) to change mid-method. This would not only break a lot of Java code in very surprising ways, but also some assumptions
made by the JIT compilers. Therefore, all safe constructs based on continuations must be confined to a single thread (or implement a thread, as done by virtual threads).</div>
<div class=""><br class="">
</div>
<div class="">— Ron<br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 22 Jul 2022, at 13:00, Remi Forax <<a href="mailto:forax@univ-mlv.fr" class="">forax@univ-mlv.fr</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">
<div style="font-family: arial, helvetica, sans-serif; font-size: 12pt;" class="">
<div class="">This question has been answered several time on this list by Ron,<br class="">
</div>
<div class="">the class Contination is unsafe, it's kind of useful to understand how the internals works but this class can not be published publicly.<br data-mce-bogus="1" class="">
</div>
<div class=""><br data-mce-bogus="1" class="">
</div>
<div class="">Rémi<br data-mce-bogus="1" class="">
</div>
<div class=""><br class="">
</div>
<hr id="zwchr" data-marker="__DIVIDER__" class="">
<div data-marker="__HEADERS__" class="">
<blockquote style="border-left-width: 2px; border-left-style: solid; border-left-color: rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica, Arial, sans-serif; font-size: 12pt;" class="">
<b class="">From: </b>"Daniel Hinojosa" <<a href="mailto:dhinojosa@evolutionnext.com" class="">dhinojosa@evolutionnext.com</a>><br class="">
<b class="">To: </b><a href="mailto:loom-dev@openjdk.org" class="">loom-dev@openjdk.org</a><br class="">
<b class="">Sent: </b>Friday, July 22, 2022 5:40:40 AM<br class="">
<b class="">Subject: </b>Motivation to put Continuation, ContinuationScope, and Scope in jdk.internal.vm package<br class="">
</blockquote>
</div>
<div data-marker="__QUOTED_TEXT__" class="">
<blockquote style="border-left-width: 2px; border-left-style: solid; border-left-color: rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica, Arial, sans-serif; font-size: 12pt;" class="">
<div dir="ltr" class="">Hello, <br class="">
<div class="">I have been watching Loom and have been excited about it and I can't wait for the first official preview this fall. I had one example that I used in demonstrating continuations and scope but it seems now that it was placed in an internal package
and likely inaccessible by the module system. Is there any use case where a developer may want to use the Continuation, ContinuationScope and Scope objects for their purposes and would you consider moving it back out into public use?</div>
<br class="">
<div class="">Danno</div>
</div>
<br class="">
</blockquote>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>