From cf9b09ff352611fb8cee3679127f3655cbe73ae7 Mon Sep 17 00:00:00 2001 From: Benoit Germain Date: Mon, 20 Jan 2014 10:51:11 +0100 Subject: get()/set() improvements * bumped version to 3.8.0 * linda:set() accepts multiple values to set in the specified slot * linda:get() accepts an optional count to peek several values at once * nil values are now converted just as in send()/receive() --- docs/index.html | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'docs') diff --git a/docs/index.html b/docs/index.html index 3b64cb4..da37cef 100644 --- a/docs/index.html +++ b/docs/index.html @@ -70,7 +70,7 @@

- This document was revised on 16-Jan-14, and applies to version 3.7.8. + This document was revised on 20-Jan-14, and applies to version 3.8.0.

@@ -1068,23 +1068,31 @@

-	[true] = linda_h:set( key, [val])
+	[bool] = linda_h:set( key [, val [, ...]])
 
-	[val] = linda_h:get( key)
+	[val [, ...]] = linda_h:get( key [, count = 1])
 

The table access methods are for accessing a slot without queuing or consuming. They can be used for making shared tables of storage among the lanes. +
+ Writing to a slot never blocks because it ignores the limit. It overwrites existing value and clears any possible queued entries. +
+ Reading doesn't block either because get() returns whatever is available (which can be nothing), up to the specified count. +
+ Table access and send()/receive() can be used together; reading a slot essentially peeks the next outcoming value of a queue.

- Writing to a slot never blocks because it ignores the limit. It overwrites existing value and clears any possible queued entries. + set() signals the linda for write if a value is stored.
- set() signals the linda from write if a value is stored. -
- (Since version 3.7.7) if the key was full but the new data count of the key after set() is below its limit, set() returns true and the linda is also signaled for read so that send()-blocked threads are awakened. + (Since version 3.7.7) if the key was full but the new data count of the key after set() is below its limit, set() returns true and the linda is also signaled for read so that send()-blocked threads are awakened. +

+ +

+ Since version 3.8.0, set() can write several values at the specified key, writing nil values is now possible, and clearing the contents at the specified key is done by not providing any value.
- Table access and send()/receive() can be used together; reading a slot essentially peeks the next outcoming value of a queue. + Also, get() can read several values at once. If the key contains no data, get() returns no value. This can be used to separate the case when reading stored nil values.

-- 
cgit v1.2.3-55-g6feb