Package groovy.concurrent
Class AsyncChannel.Producer<T>
java.lang.Object
groovy.concurrent.AsyncChannel.Producer<T>
- Type Parameters:
T- the payload type
- Enclosing interface:
- AsyncChannel<T>
Blocking sender for
AsyncChannel.produce(int, Consumer).
send(Object) waits until the channel accepts the value, so a
rendezvous producer does not run ahead of its consumer.
- Since:
- 6.0.1
-
Method Summary
Modifier and TypeMethodDescriptionReturns the channel this producer sends to.voidSendsvalueand waits until it is buffered or delivered.
-
Method Details
-
send
Sendsvalueand waits until it is buffered or delivered.- Parameters:
value- the value to send; must not benull- Throws:
ChannelClosedException- if the channel is closedNullPointerException- ifvalueis null
-
getChannel
Returns the channel this producer sends to.- Returns:
- the underlying channel
-