From 0b91ddda94b7b1d98036ac92b25dd8221f2fd661 Mon Sep 17 00:00:00 2001 From: moteus Date: Tue, 31 Dec 2013 12:56:39 +0400 Subject: Update README [ci skip] --- README.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index d23fc7c..19bbb10 100644 --- a/README.md +++ b/README.md @@ -41,12 +41,13 @@ local thread = require "llthreads".new[[ ]] -- We tell that we start atached thread but child Lua State shuld be close in child thread. --- So thread:join() can not return any Lua values. -- If `thread` became garbage in main thread then finallizer calls thread:join() -- and main thread may hungup. thread:start(false, false) --- we can call join +-- We can call join. +-- Because of Lua state destroys in child thread we can not get +-- returned Lua vaules so we just returns `true`. thread:join() ``` @@ -57,13 +58,14 @@ local thread = require "llthreads".new[[ require "utils".sleep(5) ]] --- We tell that we start detached thread but with ability call thread:join() and --- gets lua return values from child thread. In fact we start atached thread but if `thread` --- became garbage in main thread then finallizer just detach child thread and main thread --- may not hungup. +-- We tell that we start detached joinable thread. In fact we start atached +-- thread but if `thread` became garbage in main thread then finallizer just +-- detach child thread and main thread may not hungup. thread:start(true, true) --- we can call join +-- We can call join. +-- Because of Lua state destroys in child thread we can not get +-- returned Lua vaules so we just returns `true`. thread:join() ``` -- cgit v1.2.3-55-g6feb