From 62a7eab66f8f6af66c94390138815c3171b62810 Mon Sep 17 00:00:00 2001 From: Benoit Germain Date: Wed, 26 Jun 2024 17:45:16 +0200 Subject: Change linda:limit() * read the current limit of a key if no limit is provided * "unlimited" is to be used to clear the limit * fix linda:set() not ignoring the limit --- docs/index.html | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'docs') diff --git a/docs/index.html b/docs/index.html index c6cf474..8e84fcb 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1222,14 +1222,16 @@

-	bool|(nil,[lanes.cancel_error|"timeout"]) = h:limit(key, n_uint)
+	bool|(nil,[lanes.cancel_error|"timeout"]) = h:limit(key, <limit>)
+	>limit< = h:limit(key)
 

- By default, queue sizes are unlimited but limits can be enforced using the limit() method. This can be useful to balance execution speeds in a producer/consumer scenario. nil removes the limit.
- A limit of 0 is allowed to block everything.
- If the key was full but the limit change added some room, limit() returns true and the Linda is signalled so that send()-blocked threads are awakened, else the return value is false.
- Or nil, lanes.cancel_error in case of cancellation, of course. + By default, queue sizes are unlimited but limits can be enforced using the limit() method. This can be useful to balance execution speeds in a producer/consumer scenario.
+ A limit of 0 is allowed to block everything. "unlimited" removes the limit.
+ If the key was full but the limit change added some room, limit() returns true and the Linda is signalled so that send()-blocked threads are awakened, else the return value is false. + If no limit is provided, limit() returns a single value, the current limit for the specified key.
+ Whether reading or writing, if the Linda is cancelled, limit() returns nil, lanes.cancel_error.

-- 
cgit v1.2.3-55-g6feb