diff options
author | Alexey Melnichuk <mimir@newmail.ru> | 2014-02-11 17:32:59 +0400 |
---|---|---|
committer | Alexey Melnichuk <mimir@newmail.ru> | 2014-02-11 17:34:14 +0400 |
commit | d13929706a3b45bd64e0a87e0afc3d45625e888d (patch) | |
tree | d1c846805f127736d1dafb3b3094eaf78d032859 /llthreads2/test/test_pass_cfunction.lua | |
parent | 46ed59584e5407c49a02f1ea6bede6487259a92e (diff) | |
download | lua-llthreads2-d13929706a3b45bd64e0a87e0afc3d45625e888d.tar.gz lua-llthreads2-d13929706a3b45bd64e0a87e0afc3d45625e888d.tar.bz2 lua-llthreads2-d13929706a3b45bd64e0a87e0afc3d45625e888d.zip |
Init LuaDist for llthreads2 module.
Diffstat (limited to '')
-rw-r--r-- | llthreads2/test/test_pass_cfunction.lua | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/llthreads2/test/test_pass_cfunction.lua b/llthreads2/test/test_pass_cfunction.lua new file mode 100644 index 0000000..86fcd3d --- /dev/null +++ b/llthreads2/test/test_pass_cfunction.lua | |||
@@ -0,0 +1,17 @@ | |||
1 | local llthreads = require"llthreads" | ||
2 | local utils = require"utils" | ||
3 | |||
4 | local thread = llthreads.new(utils.thread_init .. [[ | ||
5 | require "llthreads" | ||
6 | local fn = ... | ||
7 | |||
8 | if type(fn) ~= 'function' then | ||
9 | print("ERROR! No function : ", fn, type(fn)) | ||
10 | os.exit(-2) | ||
11 | end | ||
12 | |||
13 | fn("print('Done!'); require'os'.exit(0)"):start():join() | ||
14 | ]], llthreads.new) | ||
15 | |||
16 | print(thread:start():join()) | ||
17 | os.exit(-1) \ No newline at end of file | ||