diff options
author | Benoit Germain <bnt.germain@gmail.com> | 2011-02-17 07:52:53 +0100 |
---|---|---|
committer | Benoit Germain <bnt.germain@gmail.com> | 2011-02-17 07:52:53 +0100 |
commit | ab233d0c9a1edc34836e2249c1eb6d714f1066b5 (patch) | |
tree | a91078b0ca240f870f5f15c2930bc0719a86c9d1 /tests/basic.lua | |
parent | afb2da4789cdaddc5a0c3c9c2d57ccd36bcc74c7 (diff) | |
download | lanes-ab233d0c9a1edc34836e2249c1eb6d714f1066b5.tar.gz lanes-ab233d0c9a1edc34836e2249c1eb6d714f1066b5.tar.bz2 lanes-ab233d0c9a1edc34836e2249c1eb6d714f1066b5.zip |
Lane userdata implementation refactoring:
- Refactor lane proxy implementation: it is now a full userdata instead
of a table, and its methods are implemented in C instead of Lua.
* its metatable is no longer accessible.
* writing to the proxy raises an error.
* it is no longer possible to overwrite its join() and cancel() methods
- when a deep userdata idfunc requests a module to be required, manually
check that it is not loaded before requiring it instead of relying on
the require function's loop detection feature.
- when a module must be required, raise an error if the 'require' function
is not found in the target state.
- we know Lanes is loaded in the master state, so we don't force it
to be required in every lane too when a linda deep userdata is copied.
Diffstat (limited to 'tests/basic.lua')
-rw-r--r-- | tests/basic.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/basic.lua b/tests/basic.lua index 352e029..853a8de 100644 --- a/tests/basic.lua +++ b/tests/basic.lua | |||
@@ -171,7 +171,7 @@ local function PEEK() return linda:get("<-") end | |||
171 | local function SEND(...) linda:send( "->", ... ) end | 171 | local function SEND(...) linda:send( "->", ... ) end |
172 | local function RECEIVE() return linda:receive( "<-" ) end | 172 | local function RECEIVE() return linda:receive( "<-" ) end |
173 | 173 | ||
174 | local t= lanes_gen("io,package",chunk)(linda) -- prepare & launch | 174 | local t= lanes_gen("io",chunk)(linda) -- prepare & launch |
175 | 175 | ||
176 | SEND(1); WR( "1 sent\n" ) | 176 | SEND(1); WR( "1 sent\n" ) |
177 | SEND(2); WR( "2 sent\n" ) | 177 | SEND(2); WR( "2 sent\n" ) |