<div dir="ltr"><div dir="ltr">Em seg., 1 de jul. de 2024 às 21:02, Brian S O'Neill <<a href="mailto:bronee@gmail.com">bronee@gmail.com</a>> escreveu:<br></div><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
If you depended on virtual threads being GC'd when blocked with a real <br>
infinite timeout, then switching to platform threads would introduce a <br>
memory leak that didn't exist before. Ideally, the two thread types <br>
should be interchangeable.<br></blockquote><div><br></div><div>But what about an "impossible" wait?<br></div><div>A thread in a pseudo-infinite wait will wake eventually, and the platform cannot know if this was intentional or not.<br></div><div><div>But a thread waiting on a blocking queue whose only reference is the thread itself will never wake, since there is no one to insert into the queue.</div><div><br></div></div><div>--<br></div></div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Pedro Lamarão</div></div></div></div>