Cancelling a sleeping fiber

Fabio Tudone fabtud at
Tue Nov 6 06:54:20 UTC 2018

Hi, am I correct that currently "java.lang.Fiber"'s "cancel" method doesn't
interrupt a sleeping fiber and that currently the only way to do that is
interrupting the corresponding shadow thread?
Is it meant to be like this (in this case I suggest to document it in the
JavaDoc though) or will there be something like a "cancel(boolean
canInterrupt)" overload in the future?

Also, currently the "CompletableFuture" returned by scheduling a "Callable"
doesn't seem to cancel nor interrupt the underlying fiber itself: I think
this too should be either changed or clarified in the JavaDoc.

-- Fabio

More information about the loom-dev mailing list