aboutsummaryrefslogtreecommitdiff
path: root/test/test_llthreads.lua
diff options
context:
space:
mode:
authormoteus <mimir@newmail.ru>2013-12-26 18:10:40 +0400
committermoteus <mimir@newmail.ru>2013-12-26 18:10:40 +0400
commit5291caae5be68250a4d9aafa54fe2081ab2a6113 (patch)
tree48faae28c997bbb9552feb6fe60f350dee72714b /test/test_llthreads.lua
parent5982fd74baad6cdee2c536203afe6c435a2d02e9 (diff)
downloadlua-llthreads2-5291caae5be68250a4d9aafa54fe2081ab2a6113.tar.gz
lua-llthreads2-5291caae5be68250a4d9aafa54fe2081ab2a6113.tar.bz2
lua-llthreads2-5291caae5be68250a4d9aafa54fe2081ab2a6113.zip
Update tests.
Diffstat (limited to 'test/test_llthreads.lua')
-rw-r--r--test/test_llthreads.lua24
1 files changed, 1 insertions, 23 deletions
diff --git a/test/test_llthreads.lua b/test/test_llthreads.lua
index 3474b9b..df8c6a2 100644
--- a/test/test_llthreads.lua
+++ b/test/test_llthreads.lua
@@ -19,29 +19,7 @@
19-- THE SOFTWARE. 19-- THE SOFTWARE.
20 20
21local llthreads = require"llthreads" 21local llthreads = require"llthreads"
22 22local sleep = require"utils".sleep
23local sleep
24local status, socket = pcall(require,"socket")
25if status then
26 sleep = function(secs)
27 return socket.sleep(secs)
28 end
29end
30
31if not sleep then
32 local status, ztimer = pcall(require, "lzmq.timer")
33 if status then
34 sleep = function(secs)
35 ztimer.sleep(secs * 1000)
36 end
37 end
38end
39
40if not sleep then
41 sleep = function(secs)
42 os.execute("sleep " .. tonumber(secs))
43 end
44end
45 23
46local function detached_thread(...) 24local function detached_thread(...)
47 local thread = llthreads.new([[ print("print_detached_thread:", ...) ]], ...) 25 local thread = llthreads.new([[ print("print_detached_thread:", ...) ]], ...)