Re: draft Carrier API
Doug Lea via Concurrency-interest <[email protected]> Sun, 8 Mar 2020 09:37:34 -0400
| Newsgroups | gmane.comp.java.jsr.166-concurrency |
|---|---|
| Message-ID | <[email protected]> |
On 3/8/20 8:49 AM, Alex Otenko via Concurrency-interest wrote:
> I think it may be useful to clarify who is meant to call each of the
> close methods.
Right; thanks especially for the questions about what confused
programmers who aren't used to dealing with half-closed states might do.
Probably best to stop using "close" except for full close. And kill
closeForReceiving. Leaving better names and simpler specs:
interface Carriable<T> extends AutoCloseable {
boolean isClosed();
boolean isFinishedSending(); // closed or sending disabled
//...
}
interface CarrierSender<T> extends Carriable<T> {
void finishSending(); // disable sending; close when empty
// ...
}
Full versions as usual at: http://gee.cs.oswego.edu/dl/wwwtmp/Carrier.java
_______________________________________________
Concurrency-interest mailing list
[email protected]
http://cs.oswego.edu/mailman/listinfo/concurrency-interest