From 62a7eab66f8f6af66c94390138815c3171b62810 Mon Sep 17 00:00:00 2001
From: Benoit Germain
- 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 |