summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authormoteus <mimir@newmail.ru>2013-12-31 13:11:28 +0400
committermoteus <mimir@newmail.ru>2013-12-31 13:11:28 +0400
commitaf2087987852b6250e7aaafd626e292893d43a7d (patch)
treef85ba1b7cfddea43d34afaa6140ca29b1ea1bc87 /README.md
parent0b91ddda94b7b1d98036ac92b25dd8221f2fd661 (diff)
downloadlua-llthreads2-af2087987852b6250e7aaafd626e292893d43a7d.tar.gz
lua-llthreads2-af2087987852b6250e7aaafd626e292893d43a7d.tar.bz2
lua-llthreads2-af2087987852b6250e7aaafd626e292893d43a7d.zip
Add. test for lua-llthreas2 module.
Diffstat (limited to 'README.md')
-rw-r--r--README.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/README.md b/README.md
index 19bbb10..f84fdb2 100644
--- a/README.md
+++ b/README.md
@@ -33,14 +33,14 @@ llthread.set_logger(function(msg) LOG.error(msg) end)
33error("SOME ERROR") 33error("SOME ERROR")
34``` 34```
35 35
36### Start atached thread collectd in child thread 36### Start attached thread collectd in child thread
37``` Lua 37``` Lua
38-- This is main thread. 38-- This is main thread.
39local thread = require "llthreads".new[[ 39local thread = require "llthreads".new[[
40 require "utils".sleep(5) 40 require "utils".sleep(5)
41]] 41]]
42 42
43-- We tell that we start atached thread but child Lua State shuld be close in child thread. 43-- We tell that we start attached thread but child Lua State shuld be close in child thread.
44-- If `thread` became garbage in main thread then finallizer calls thread:join() 44-- If `thread` became garbage in main thread then finallizer calls thread:join()
45-- and main thread may hungup. 45-- and main thread may hungup.
46thread:start(false, false) 46thread:start(false, false)
@@ -51,14 +51,14 @@ thread:start(false, false)
51thread:join() 51thread:join()
52``` 52```
53 53
54### Start detached thread on which we can call join 54### Start detached joinable thread
55``` Lua 55``` Lua
56-- This is main thread. 56-- This is main thread.
57local thread = require "llthreads".new[[ 57local thread = require "llthreads".new[[
58 require "utils".sleep(5) 58 require "utils".sleep(5)
59]] 59]]
60 60
61-- We tell that we start detached joinable thread. In fact we start atached 61-- We tell that we start detached joinable thread. In fact we start attached
62-- thread but if `thread` became garbage in main thread then finallizer just 62-- thread but if `thread` became garbage in main thread then finallizer just
63-- detach child thread and main thread may not hungup. 63-- detach child thread and main thread may not hungup.
64thread:start(true, true) 64thread:start(true, true)