aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_threads_attr.lua21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/test_threads_attr.lua b/test/test_threads_attr.lua
new file mode 100644
index 0000000..fbcb036
--- /dev/null
+++ b/test/test_threads_attr.lua
@@ -0,0 +1,21 @@
1local llthreads = require"llthreads.ex"
2
3local thread = llthreads.new(function() return 1 end)
4
5assert(not thread:started())
6
7-- thread is not started so this is not valid values
8assert(not thread:detached())
9assert(not thread:joinable())
10
11assert(thread:start(true, true))
12
13assert(thread:detached())
14assert(thread:joinable())
15
16assert(thread:join())
17
18assert(thread:started())
19assert(not thread:alive())
20
21print("done!") \ No newline at end of file