How are Carrier doing these days?

Attila Kelemen attila.kelemen85 at gmail.com
Tue Jun 6 15:12:56 UTC 2023


>
>
> One thing that is helpful to go with your question is to know if you've
> tried LinkedTransferQueue or any of the other blocking queues with virtual
> threads. Only asking because hearing feedback on using the existing APIs
> and hearing about any issues/limitations is always helpful.
>
>
Telling the queue that the reader went away (maybe crashed) is still
awkward. It is less problematic with virtual threads, because you can
cheaply start a new virtual thread, and interrupt it more safely. However,
that is still not the best, because I want to be able to tell that I'm
ending the queue, not the thread (besides, I don't necessarily want to
start a new virtual thread, even if it is relatively cheap). Besides, the
distinction between closing the queue and doing some larger scope
cancellation (especially interrupting a thread) is still important, because
- sadly - quite often people swallow interrupted exceptions (sometimes even
respectable libraries). Also, while you might be closing the queue, you
might not want to interrupt code before and after queue processing. Though
it would lead deeper, using interrupt for cancellation is rather annoying
anyway (so much so, that I wrote a completely new executor framework mainly
because of that, and never looked back).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20230606/9694b034/attachment.htm>


More information about the loom-dev mailing list