[concurrency-interest] draft Carrier API

John Rose john.r.rose at oracle.com
Wed Mar 11 05:00:12 UTC 2020


On Mar 8, 2020, at 6:37 AM, Doug Lea <dl at cs.oswego.edu> wrote:
> 
> interface CarrierSender<T> extends Carriable<T> {
>    void finishSending();           // disable sending; close when empty
>    // ...
> }

This rings true to me (but I’m not an expert in these APIs).

Would there be a use case where the sender side of a connection
is the subject of a try-with-resources, where the end of the block
needs to issue a `finishSending` call?  In that case, the sender
side (in isolation from the whole channel) might benefit from
a view object whose close method is an alias for `finishSending`.



More information about the loom-dev mailing list