From 3de8f797d0e235efd20fdc9c55c8068893f4fd03 Mon Sep 17 00:00:00 2001 From: Alexey Melnichuk Date: Wed, 25 Jun 2014 10:11:17 +0500 Subject: Add. started/detached/joinable methods to thread object. --- src/lua/llthreads2/ex.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/lua') 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() return self.thread:alive() end +--- Check if thread was started. +-- +function thread_mt:started() + return self.thread:started() +end + +--- Check if thread is detached. +-- This function returns valid value only for started thread. +function thread_mt:detached() + return self.thread:detached() +end + +--- Check if thread is joinable. +-- This function returns valid value only for started thread. +function thread_mt:joinable() + return self.thread:joinable() +end + end ------------------------------------------------------------------------------- -- cgit v1.2.3-55-g6feb