diff options
author | Alexey Melnichuk <mimir@newmail.ru> | 2014-06-26 14:45:59 +0500 |
---|---|---|
committer | Alexey Melnichuk <mimir@newmail.ru> | 2014-06-26 14:51:19 +0500 |
commit | f3c67b75752cab9259ec4542e615e54a2b24ec66 (patch) | |
tree | 35a613eea89a2d73757926d4b2199701494b5153 | |
parent | d9aa58f0ef5a8c2c8550c6aa23409123c18a3c54 (diff) | |
download | lua-llthreads2-f3c67b75752cab9259ec4542e615e54a2b24ec66.tar.gz lua-llthreads2-f3c67b75752cab9259ec4542e615e54a2b24ec66.tar.bz2 lua-llthreads2-f3c67b75752cab9259ec4542e615e54a2b24ec66.zip |
Add. rockspecs for 0.1.2v0.1.2
-rw-r--r-- | dist.info | 2 | ||||
-rw-r--r-- | rockspecs/lua-llthreads2-0.1.2-1.rockspec | 45 | ||||
-rw-r--r-- | rockspecs/lua-llthreads2-compat-0.1.2-1.rockspec | 45 | ||||
-rw-r--r-- | src/llthread.c | 2 | ||||
-rw-r--r-- | src/lua/llthreads2/ex.lua | 2 |
5 files changed, 92 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | name = "lua-llthreads2" | 1 | name = "lua-llthreads2" |
2 | version = "0.1.1" | 2 | version = "0.1.2" |
3 | 3 | ||
4 | desc = "A simple Lua wrapper for pthreads & WIN32 threads." | 4 | desc = "A simple Lua wrapper for pthreads & WIN32 threads." |
5 | author = "Alexey Melnichuk" | 5 | author = "Alexey Melnichuk" |
diff --git a/rockspecs/lua-llthreads2-0.1.2-1.rockspec b/rockspecs/lua-llthreads2-0.1.2-1.rockspec new file mode 100644 index 0000000..3434c74 --- /dev/null +++ b/rockspecs/lua-llthreads2-0.1.2-1.rockspec | |||
@@ -0,0 +1,45 @@ | |||
1 | package = "lua-llthreads2" | ||
2 | version = "0.1.2-1" | ||
3 | source = { | ||
4 | url = "https://github.com/moteus/lua-llthreads2/archive/v0.1.2.zip", | ||
5 | dir = "lua-llthreads2-0.1.2", | ||
6 | } | ||
7 | description = { | ||
8 | summary = "Low-Level threads for Lua", | ||
9 | homepage = "http://github.com/moteus/lua-llthreads2", | ||
10 | license = "MIT/X11", | ||
11 | detailed = [[ | ||
12 | This is drop-in replacement for `lua-llthread` module but the module called `llthreads2`. | ||
13 | In additional module supports: thread join with zero timeout; logging thread errors with | ||
14 | custom logger; run detached joinable threads; pass cfunctions as argument to child thread. | ||
15 | ]], | ||
16 | } | ||
17 | dependencies = { | ||
18 | "lua >= 5.1, < 5.3", | ||
19 | } | ||
20 | build = { | ||
21 | type = "builtin", | ||
22 | platforms = { | ||
23 | unix = { | ||
24 | modules = { | ||
25 | llthreads2 = { | ||
26 | libraries = {"pthread"}, | ||
27 | } | ||
28 | } | ||
29 | }, | ||
30 | windows = { | ||
31 | modules = { | ||
32 | llthreads2 = { | ||
33 | libraries = {"kernel32"}, | ||
34 | } | ||
35 | } | ||
36 | } | ||
37 | }, | ||
38 | modules = { | ||
39 | llthreads2 = { | ||
40 | sources = { "src/l52util.c", "src/llthread.c" }, | ||
41 | defines = { "LLTHREAD_MODULE_NAME=llthreads2" }, | ||
42 | }, | ||
43 | ["llthreads2.ex"] = "src/lua/llthreads2/ex.lua", | ||
44 | } | ||
45 | } \ No newline at end of file | ||
diff --git a/rockspecs/lua-llthreads2-compat-0.1.2-1.rockspec b/rockspecs/lua-llthreads2-compat-0.1.2-1.rockspec new file mode 100644 index 0000000..c7200c6 --- /dev/null +++ b/rockspecs/lua-llthreads2-compat-0.1.2-1.rockspec | |||
@@ -0,0 +1,45 @@ | |||
1 | package = "lua-llthreads2-compat" | ||
2 | version = "0.1.2-1" | ||
3 | source = { | ||
4 | url = "https://github.com/moteus/lua-llthreads2/archive/v0.1.2.zip", | ||
5 | dir = "lua-llthreads2-0.1.2", | ||
6 | } | ||
7 | description = { | ||
8 | summary = "Low-Level threads for Lua", | ||
9 | homepage = "http://github.com/moteus/lua-llthreads2", | ||
10 | license = "MIT/X11", | ||
11 | detailed = [[ | ||
12 | This is drop-in replacement for `lua-llthread` module. | ||
13 | In additional module supports: thread join with zero timeout; logging thread errors with | ||
14 | custom logger; run detached joinable threads; pass cfunctions as argument to child thread. | ||
15 | ]], | ||
16 | } | ||
17 | dependencies = { | ||
18 | "lua >= 5.1, < 5.3", | ||
19 | } | ||
20 | build = { | ||
21 | type = "builtin", | ||
22 | platforms = { | ||
23 | unix = { | ||
24 | modules = { | ||
25 | llthreads = { | ||
26 | libraries = {"pthread"}, | ||
27 | } | ||
28 | } | ||
29 | }, | ||
30 | windows = { | ||
31 | modules = { | ||
32 | llthreads = { | ||
33 | libraries = {"kernel32"}, | ||
34 | } | ||
35 | } | ||
36 | } | ||
37 | }, | ||
38 | modules = { | ||
39 | llthreads = { | ||
40 | sources = { "src/l52util.c", "src/llthread.c" }, | ||
41 | defines = { "LLTHREAD_MODULE_NAME=llthreads" }, | ||
42 | }, | ||
43 | ["llthreads.ex"] = "src/lua/llthreads2/ex.lua", | ||
44 | } | ||
45 | } \ No newline at end of file | ||
diff --git a/src/llthread.c b/src/llthread.c index 33eab4f..5216660 100644 --- a/src/llthread.c +++ b/src/llthread.c | |||
@@ -5,7 +5,7 @@ | |||
5 | #define LLTHREAD_VERSION_MAJOR 0 | 5 | #define LLTHREAD_VERSION_MAJOR 0 |
6 | #define LLTHREAD_VERSION_MINOR 1 | 6 | #define LLTHREAD_VERSION_MINOR 1 |
7 | #define LLTHREAD_VERSION_PATCH 2 | 7 | #define LLTHREAD_VERSION_PATCH 2 |
8 | #define LLTHREAD_VERSION_COMMENT "dev" | 8 | // #define LLTHREAD_VERSION_COMMENT "dev" |
9 | 9 | ||
10 | #ifndef USE_PTHREAD | 10 | #ifndef USE_PTHREAD |
11 | # include <windows.h> | 11 | # include <windows.h> |
diff --git a/src/lua/llthreads2/ex.lua b/src/lua/llthreads2/ex.lua index 77f8d5e..f0c27d9 100644 --- a/src/lua/llthreads2/ex.lua +++ b/src/lua/llthreads2/ex.lua | |||
@@ -182,8 +182,6 @@ threads.new = function (code, ...) | |||
182 | return new_thread(LUA_INIT, nil, code, ...) | 182 | return new_thread(LUA_INIT, nil, code, ...) |
183 | end | 183 | end |
184 | 184 | ||
185 | threads.thread_mt = thread_mt | ||
186 | |||
187 | end | 185 | end |
188 | ------------------------------------------------------------------------------- | 186 | ------------------------------------------------------------------------------- |
189 | 187 | ||