diff options
author | Alexey Melnichuk <mimir@newmail.ru> | 2015-04-06 11:37:29 +0400 |
---|---|---|
committer | Alexey Melnichuk <mimir@newmail.ru> | 2015-04-06 11:37:29 +0400 |
commit | 07cda72f53d1c1bb176417797e1ea3d2c6272931 (patch) | |
tree | b417925fcb1543b83ad693453611ee8c2e3da6d8 | |
parent | 75a319a5e7d251bc18994fad56749017f8fac993 (diff) | |
download | lua-llthreads2-07cda72f53d1c1bb176417797e1ea3d2c6272931.tar.gz lua-llthreads2-07cda72f53d1c1bb176417797e1ea3d2c6272931.tar.bz2 lua-llthreads2-07cda72f53d1c1bb176417797e1ea3d2c6272931.zip |
Update README.md
Close #2
-rw-r--r-- | README.md | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -35,7 +35,7 @@ This is full dropin replacement for [llthreads](https://github.com/Neopallium/lu | |||
35 | In this example I use [lua-log](https://github.com/moteus/lua-log) library. | 35 | In this example I use [lua-log](https://github.com/moteus/lua-log) library. |
36 | ``` Lua | 36 | ``` Lua |
37 | -- This is child thread. | 37 | -- This is child thread. |
38 | local llthreads = require "llthreads" | 38 | local llthreads = require "llthreads2" |
39 | -- Send logs using ZMQ | 39 | -- Send logs using ZMQ |
40 | local LOG = require"log".new( | 40 | local LOG = require"log".new( |
41 | require "log.writer.net.zmq".new("tcp://127.0.0.1:5555") | 41 | require "log.writer.net.zmq".new("tcp://127.0.0.1:5555") |
@@ -48,7 +48,7 @@ error("SOME ERROR") | |||
48 | ### Start attached thread collectd in child thread | 48 | ### Start attached thread collectd in child thread |
49 | ``` Lua | 49 | ``` Lua |
50 | -- This is main thread. | 50 | -- This is main thread. |
51 | local thread = require "llthreads".new[[ | 51 | local thread = require "llthreads2".new[[ |
52 | require "utils".sleep(5) | 52 | require "utils".sleep(5) |
53 | ]] | 53 | ]] |
54 | 54 | ||
@@ -67,7 +67,7 @@ thread:join() | |||
67 | ### Start detached joinable thread | 67 | ### Start detached joinable thread |
68 | ``` Lua | 68 | ``` Lua |
69 | -- This is main thread. | 69 | -- This is main thread. |
70 | local thread = require "llthreads".new[[ | 70 | local thread = require "llthreads2".new[[ |
71 | require "utils".sleep(5) | 71 | require "utils".sleep(5) |
72 | ]] | 72 | ]] |
73 | 73 | ||
@@ -104,7 +104,7 @@ llthreads.new([[ | |||
104 | 104 | ||
105 | ### Wait while thread is alive | 105 | ### Wait while thread is alive |
106 | ``` Lua | 106 | ``` Lua |
107 | local thread = require "llthreads".new[[ | 107 | local thread = require "llthreads2".new[[ |
108 | require "utils".sleep(5) | 108 | require "utils".sleep(5) |
109 | return 1 | 109 | return 1 |
110 | ]] | 110 | ]] |
@@ -121,7 +121,7 @@ local ok, ret = thread:join() -- true, 1 | |||
121 | 121 | ||
122 | ### Use `ex` module | 122 | ### Use `ex` module |
123 | ``` Lua | 123 | ``` Lua |
124 | local Threads = require "llthreads.ex" | 124 | local Threads = require "llthreads2.ex" |
125 | 125 | ||
126 | local ok, v = Threads.new(function() | 126 | local ok, v = Threads.new(function() |
127 | return 1 | 127 | return 1 |