From 57176e9b135b037fd33b8291d12416b9485b759b Mon Sep 17 00:00:00 2001
From: Benoit Germain
Date: Wed, 26 Jun 2024 11:01:01 +0200
Subject: Make lanes.gen stricter on base libraries
---
docs/index.html | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
(limited to 'docs')
diff --git a/docs/index.html b/docs/index.html
index 281bd82..c6cf474 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -1185,13 +1185,17 @@
- Keys can be of boolean, number, string, light userdata, and deep userdata type. Tables and functions can't be keys because their identity isn't preserved when transfered from one Lua state to another.
- values can be any type supported by inter-state copying (same limits as for function arguments and upvalues).
- - consuming method is :receive (not in).
- - non-consuming method is :get (not rd).
- - two producer-side methods: :send and :set (not out).
+ -
+ Registered functions transiting into a Keeper state are converted to a special dummy function that holds its actual identity. On transit out, the identity is used to find the real function in the destination.
+ For that reason, it is not possible to run user code inside a Keeper state. The only exception is on_state_create, which is handled in a special way.
+
+ - Consuming method is :receive (not in).
+ - Non-consuming method is :get (not rd).
+ - Two producer-side methods: :send and :set (not out).
- send allows for sending multiple values -atomically- to a given key.
- receive can wait for multiple keys at once.
- receive has a batched mode to consume more than one value from a single key, as in linda:receive(1.0, linda.batched, "key", 3, 6).
- - individual keys' queue length can be limited, balancing speed differences in a producer/consumer scenario (making :send wait).
+ - Individual keys' queue length can be limited, balancing speed differences in a producer/consumer scenario (making :send wait).
- tostring(linda) returns a string of the form "Linda: <opt_name>"
-
Several Linda objects may share the same Keeper state. In case there is more than one user Keeper state, assignation must be controlled with the Linda's group (an integer in [0,nb_user_keepers]).
@@ -1375,7 +1379,7 @@
Whenever Lua code reads from or writes to a Linda, the mutex is acquired. If Linda limits don't block the operation, it is fulfilled, then the mutex is released.
If the Linda has to block, the mutex is released and the OS thread sleeps, waiting for a Linda operation to be signalled. When an operation occurs on the same Linda, possibly fufilling the condition, or a timeout expires, the thread wakes up.
If the thread is woken but the condition is not yet fulfilled, it goes back to sleep, until the timeout expires.
- When a lane is cancelled, the signal it is waiting on (if any) is signalled. In that case, the Linda operation will return lanes.cancel_error.
+ When a lane is cancelled, the signal it is waiting on (if any) is signalled. In that case, the Linda operation will return lanes.cancel_error.
--
cgit v1.2.3-55-g6feb