Latest API revision of Fiber

Remi Forax forax at
Sun Dec 9 22:36:59 UTC 2018

----- Mail original -----
> De: "Remi Forax" <forax at>
> À: "loom-dev" <loom-dev at>
> Envoyé: Dimanche 9 Décembre 2018 23:23:27
> Objet: Latest API revision of Fiber

> Hi all,
> i've just taken a look to the changes of the Fiber API since my last test :)
> In toFuture(), why do want to guarantee that there is only one CompletableFuture
> for a Fiber,
> i'm not sure i want to pay for a volatile read/volatile write (the CAS) if i
> call toFuture().
> in my opinion, it should be just a best effort thing, i.e. the future field
> doesn't need to be volatile and the CAS is not necessary.

Ok, i can answer to myself :)
it's because when you have finished to execute the fiber, you need to notify the future, so it has to be unique.
It's the price to pay to avoid to have the Fiber be a CompletableFuture itself.


> regards,
> Rémi

More information about the loom-dev mailing list