A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://docs.racket-lang.org/reference/channel.html below:

11.2.2 Channels

11.2.2 Channels🔗ℹ

A channel both synchronizes a pair of threads and passes a value from one to the other. Channels are synchronous; both the sender and the receiver must block until the (atomic) transaction is complete. Multiple senders and receivers can access a channel at once, but a single sender and receiver is selected for each transaction.

Channel synchronization is fair: if a thread is blocked on a channel and transaction opportunities for the channel occur infinitely often, then the thread eventually participates in a transaction.

In addition to its use with channel-specific procedures, a channel can be used as a synchronizable event (see Events). A channel is ready for synchronization when channel-get would not block; the channel’s synchronization result is the same as the channel-get result.

For buffered asynchronous channels, see Buffered Asynchronous Channels.

Returns

#t

if

v

is a

channel

,

#f

otherwise.

Blocks until a sender is ready to provide a value through ch. The result is the sent value.

Receives and returns a value from ch if a sender is immediately ready, otherwise returns #f.

Blocks until a receiver is ready to accept the value v through ch.

Returns

#t

if

v

is a channel-put event produced by

channel-put-evt

,

#f

otherwise.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4