1 ! Copyright (C) 2007 Chris Double.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: help.syntax help.markup ;
7 { $values { "channel" "a channel object" }
9 { $description "Create a channel that can be used for communicating between "
10 "concurrent processes and threads. " { $link to } " and " { $link from }
11 " can be used to send and receive data to/from the channel respectively. "
12 "There can be multiple readers and writers on a channel. If there are "
13 "multiple readers or writers, only one is selected at random to resume."
15 { $see-also from to } ;
18 { $values { "value" "an object" }
19 { "channel" "a channel object" }
21 { $description "Sends an object to a channel. The send operation is synchronous."
22 " It will block the calling thread until there is a receiver waiting "
23 "for data on the channel. It will return when the receiver has received "
24 "the data successfully."
26 { $see-also <channel> from } ;
29 { $values { "channel" "a channel object" }
30 { "value" "an object" }
32 { $description "Receives an object from a channel. The operation is synchronous."
33 " It will block the calling thread until there is data in the channel."
35 { $see-also <channel> to } ;
37 ARTICLE: "channels" "Channels"
38 "The " { $vocab-link "channels" } " vocabulary provides a simple abstraction to send and receive objects." $nl
40 { $subsection <channel> }
43 "Receiving a message:"
44 { $subsection from } ;