From 9268a7555226599d9e713840b9361775a3f249ef Mon Sep 17 00:00:00 2001 From: Alexey Melnichuk Date: Wed, 18 Jun 2014 15:33:49 +0500 Subject: Update README.md --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 22f2025..a3308c7 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,15 @@ This is full dropin replacement for [llthreads](https://github.com/Neopallium/lu * thread:start() has additional parameter which control in which thread child Lua VM will be destroyed * allow pass cfunctions to child thread (e.g. to initialize Lua state) +##Thread start arguments +| default | `detached` | `joinable` | join returns | child state closes by | gc calls | detach on | +|:-------:|:--------:|:--------:|:------------:|:------------------:|:--------:|:---------:| +| | false | falas | `true` | child | join | `` | +| * | false | true | Lua values | parent | join | `` | +| * | true | false | raise error | child | `` | start | +| | true | true | `true` | child | detach | gc | + + ##Usage ### Use custom logger -- cgit v1.2.3-55-g6feb From f3755c76b33a5483e51087fff6587cf09f87f5af Mon Sep 17 00:00:00 2001 From: Alexey Melnichuk Date: Wed, 18 Jun 2014 15:39:33 +0500 Subject: Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a3308c7..b7d8010 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ This is full dropin replacement for [llthreads](https://github.com/Neopallium/lu ##Thread start arguments | default | `detached` | `joinable` | join returns | child state closes by | gc calls | detach on | |:-------:|:--------:|:--------:|:------------:|:------------------:|:--------:|:---------:| -| | false | falas | `true` | child | join | `` | +| | false | false | `true` | child | join | `` | | * | false | true | Lua values | parent | join | `` | | * | true | false | raise error | child | `` | start | | | true | true | `true` | child | detach | gc | -- cgit v1.2.3-55-g6feb From 2653b5c00746d41c836d75cb2bd110e994f9e235 Mon Sep 17 00:00:00 2001 From: Alexey Melnichuk Date: Wed, 18 Jun 2014 16:22:21 +0500 Subject: Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b7d8010..58e78eb 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,8 @@ local thread = require "llthreads".new[[ -- We tell that we start attached thread but child Lua State shuld be close in child thread. -- If `thread` became garbage in main thread then finallizer calls thread:join() --- and main thread may hungup. +-- and main thread may hungup. But because of child state closes in child thread all objects +-- in this state can be destroyed and we can prevent deadlock. thread:start(false, false) -- We can call join. -- cgit v1.2.3-55-g6feb