Unichannel-wait added.
This commit is contained in:
@@ -124,6 +124,15 @@ native close operation. For port-channel wrappers this delegates to
|
||||
@racket[close-port-channel]. Calling @racket[uni-channel-close] more than once is
|
||||
safe.}
|
||||
|
||||
@defproc[(uni-channel-wait [ch uni-channel?]) void?]{
|
||||
Waits until the underlying channel worker has stopped, when the backend has such
|
||||
a worker. For @racket['port] channels this delegates to
|
||||
@racket[port-channel-wait]. This is mainly useful for output port-channels: call
|
||||
@racket[uni-channel-close] first to enqueue the close marker, then
|
||||
@racket[uni-channel-wait] to wait until all queued values have been written and
|
||||
the writer thread has stopped. For @racket['async] and @racket['place] channels,
|
||||
this returns immediately.}
|
||||
|
||||
@defproc[(uni-channel-closed? [ch uni-channel?]) boolean?]{
|
||||
Returns true when @racket[uni-channel-close] has been called on @racket[ch].}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user