diff options
author | Alexey Melnichuk <mimir@newmail.ru> | 2014-06-25 10:11:17 +0500 |
---|---|---|
committer | Alexey Melnichuk <mimir@newmail.ru> | 2014-06-25 10:11:17 +0500 |
commit | 3de8f797d0e235efd20fdc9c55c8068893f4fd03 (patch) | |
tree | e995e196db486bab6edfd6023c1e41bd1875caf8 /src/lua | |
parent | 04dce92542c727041ae042ede83a94e0e5e5a99f (diff) | |
download | lua-llthreads2-3de8f797d0e235efd20fdc9c55c8068893f4fd03.tar.gz lua-llthreads2-3de8f797d0e235efd20fdc9c55c8068893f4fd03.tar.bz2 lua-llthreads2-3de8f797d0e235efd20fdc9c55c8068893f4fd03.zip |
Add. started/detached/joinable methods to thread object.
Diffstat (limited to 'src/lua')
-rw-r--r-- | src/lua/llthreads2/ex.lua | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/lua/llthreads2/ex.lua b/src/lua/llthreads2/ex.lua index 06af3a5..77f8d5e 100644 --- a/src/lua/llthreads2/ex.lua +++ b/src/lua/llthreads2/ex.lua | |||
@@ -123,6 +123,24 @@ function thread_mt:alive() | |||
123 | return self.thread:alive() | 123 | return self.thread:alive() |
124 | end | 124 | end |
125 | 125 | ||
126 | --- Check if thread was started. | ||
127 | -- | ||
128 | function thread_mt:started() | ||
129 | return self.thread:started() | ||
130 | end | ||
131 | |||
132 | --- Check if thread is detached. | ||
133 | -- This function returns valid value only for started thread. | ||
134 | function thread_mt:detached() | ||
135 | return self.thread:detached() | ||
136 | end | ||
137 | |||
138 | --- Check if thread is joinable. | ||
139 | -- This function returns valid value only for started thread. | ||
140 | function thread_mt:joinable() | ||
141 | return self.thread:joinable() | ||
142 | end | ||
143 | |||
126 | end | 144 | end |
127 | ------------------------------------------------------------------------------- | 145 | ------------------------------------------------------------------------------- |
128 | 146 | ||