From 279f17ac0e1b3d019c2b294098e834d249376686 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Tue, 4 Jun 2019 20:49:16 -0400 Subject: Update chickadee manual. --- manuals/chickadee/Channels.html | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'manuals/chickadee/Channels.html') diff --git a/manuals/chickadee/Channels.html b/manuals/chickadee/Channels.html index f313c4f..ece7ce5 100644 --- a/manuals/chickadee/Channels.html +++ b/manuals/chickadee/Channels.html @@ -1,6 +1,6 @@ - @@ -123,22 +125,37 @@ someone on the other end of the line to complete the transaction.

-
Procedure: channel? obj
+
Procedure: channel? obj

Return #t if obj is a channel.

-
Procedure: channel-get channel
+
Procedure: channel-get channel

Retrieve a value from channel. The current script suspends until a value is available.

-
Procedure: channel-put channel data
+
Procedure: channel-put channel data

Send data to channel. The current script suspends until another script is available to retrieve the value.

+

A low-level API also exists for using channels outside of a script via +callback procedures: +

+
+
Procedure: channel-get! channel proc
+

Asynchronously retrieve a value from channel and call proc +with that value. +

+ +
+
Procedure: channel-put! channel data [thunk]
+

Asynchronously send data to channel and call thunk +after it has been received. +

+ -- cgit v1.2.3