diff options
author | Benoit Germain <bnt.germain@gmail.com> | 2013-01-30 20:28:47 +0100 |
---|---|---|
committer | Benoit Germain <bnt.germain@gmail.com> | 2013-01-30 20:28:47 +0100 |
commit | b657f38535c3c27a848353ef853d6667d6acc917 (patch) | |
tree | 8679a62c0b6343eae4781cff10a0ea60460d9cb4 /tests/timer.lua | |
parent | 3377b95704e611a288791fee6a7bc59c5ecebf2d (diff) | |
download | lanes-b657f38535c3c27a848353ef853d6667d6acc917.tar.gz lanes-b657f38535c3c27a848353ef853d6667d6acc917.tar.bz2 lanes-b657f38535c3c27a848353ef853d6667d6acc917.zip |
version 3.5.0
* new: API lanes.require(), use it instead of regular require() for modules that export C functions you need to send over.
* new: lanes no longer require 'lanes.core' by default in every created state. Use {required={"lanes.core"}} if you need to transfer lanes functions.
* internal: because of the above, reworked the timer implementation to remove upvalue-dependency on lanes.core
* new: API lanes.timer_lane, to be able to operate on timer lane if need be
* improved: if a module is a full userdata, scan its metatable for function database population
* improved: on_state_create can be a Lua function
* changed: on_state_create is called after the base libraries are loaded
* package[loaders|searchers] is no longer transfered as function naming depends on slot order
* internal: changed separator from '.' to '/' in lookup databases to be able to distinguish search levels and dot coming from module names
* added some mode debug spew
* updated tests to reflect the above changes
Diffstat (limited to 'tests/timer.lua')
-rw-r--r-- | tests/timer.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/timer.lua b/tests/timer.lua index 953e4ed..805d85c 100644 --- a/tests/timer.lua +++ b/tests/timer.lua | |||
@@ -8,8 +8,7 @@ | |||
8 | io.stderr:setvbuf "no" | 8 | io.stderr:setvbuf "no" |
9 | 9 | ||
10 | 10 | ||
11 | local lanes = require "lanes" | 11 | local lanes = require "lanes".configure() |
12 | lanes.configure() | ||
13 | 12 | ||
14 | local linda= lanes.linda() | 13 | local linda= lanes.linda() |
15 | 14 | ||
@@ -101,3 +100,5 @@ PRINT "...making sure no ticks are coming..." | |||
101 | local k,v= linda:receive( 10, T1,T2 ) -- should not get any | 100 | local k,v= linda:receive( 10, T1,T2 ) -- should not get any |
102 | assert(v==nil) | 101 | assert(v==nil) |
103 | 102 | ||
103 | lanes.timer_lane:cancel() | ||
104 | print (lanes.timer_lane[1], lanes.timer_lane[2]) \ No newline at end of file | ||