diff options
Diffstat (limited to 'test/test_threads.lua')
| -rw-r--r-- | test/test_threads.lua | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/test/test_threads.lua b/test/test_threads.lua index 467526e..459604d 100644 --- a/test/test_threads.lua +++ b/test/test_threads.lua | |||
| @@ -23,19 +23,12 @@ | |||
| 23 | -- luajit sub_threads.lua | 23 | -- luajit sub_threads.lua |
| 24 | 24 | ||
| 25 | local llthreads = require"llthreads" | 25 | local llthreads = require"llthreads" |
| 26 | local utils = require "utils" | ||
| 26 | 27 | ||
| 27 | local num_threads = tonumber(arg[1] or 1000) | 28 | local num_threads = tonumber(arg[1] or 1000) |
| 28 | 29 | ||
| 29 | -- level 0 string literal enclosure [[ ]] of child execution code | 30 | -- level 0 string literal enclosure [[ ]] of child execution code |
| 30 | local thread_code = [[ | 31 | local thread_code = utils.thread_init .. [[ |
| 31 | local lua_init = os.getenv("lua_init") | ||
| 32 | if lua_init and #lua_init > 0 then | ||
| 33 | if lua_init:sub(1,1) == '@' then | ||
| 34 | dofile(lua_init:sub(2)) | ||
| 35 | else | ||
| 36 | assert((loadstring or load)(lua_init))() | ||
| 37 | end | ||
| 38 | end | ||
| 39 | 32 | ||
| 40 | local num_threads = ... | 33 | local num_threads = ... |
| 41 | print("CHILD: received from ROOT params:", ...) | 34 | print("CHILD: received from ROOT params:", ...) |
