Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WaitingReplyQueue ¶
waitingReplyQueue abstracts a queue where requests on multiple goroutines must be made one at a time to a backing service because replies must be received in order.
A new initialized value is ready for use and must not be copied. Note that passing different contexts to the different functions may result in memory leaks.
func (*WaitingReplyQueue) ReplyLastSend ¶
func (wq *WaitingReplyQueue) ReplyLastSend(ctx context.Context, v interface{}) error
ReplyLastSend pushes the reply to the last unblocked send. It returns an error if there are no callers waiting for a reply.
func (*WaitingReplyQueue) WaitForReadyToSend ¶
func (wq *WaitingReplyQueue) WaitForReadyToSend(ctx context.Context) chan interface{}
waitForReadyToSend returns nil if the context is canceled or a chan where the next reply of this waiting queue will be received.
Click to show internal directories.
Click to hide internal directories.