Added missing dependency. Fix thread latency perf benchmark.

pull/10/head
Robert G. Jakabosky 15 years ago
parent 418bbe024a
commit 1038af6d16

@ -9,6 +9,10 @@ Installation
With LuaRocks 2.0.4.1:
$ sudo luarocks install https://github.com/Neopallium/lua-zmq/raw/master/rockspecs/lua-zmq-scm-1.rockspec
For threads support:
$ sudo luarocks install https://github.com/Neopallium/lua-llthreads/raw/master/rockspecs/lua-llthreads-scm-0.rockspec
$ sudo luarocks install https://github.com/Neopallium/lua-zmq/raw/master/rockspecs/lua-zmq-threads-scm-0.rockspec
With CMake:
$ git clone git://github.com/Neopallium/lua-zmq.git
$ cd lua-zmq ; mkdir build ; cd build

@ -29,7 +29,7 @@ local message_size = tonumber(arg[3])
local roundtrip_count = tonumber(arg[4])
local zmq = require"zmq"
local thread = require"zmq.thread"
local zthreads = require"zmq.threads"
local socket = require"socket"
local time = socket.gettime
@ -39,9 +39,9 @@ local child_code = [[
print("child:", ...)
local zmq = require"zmq"
local thread = require"zmq.thread"
local zthreads = require"zmq.threads"
local ctx = thread.get_parent_ctx()
local ctx = zthreads.get_parent_ctx()
local s = ctx:socket(zmq.REP)
s:connect(connect_to)
@ -60,7 +60,7 @@ local ctx = zmq.init(1)
local s = ctx:socket(zmq.REQ)
s:bind(bind_to)
local child_thread = thread.runstring(ctx, child_code, connect_to, message_size, roundtrip_count)
local child_thread = zthreads.runstring(ctx, child_code, connect_to, message_size, roundtrip_count)
child_thread:start()
local data = ("0"):rep(message_size)

@ -10,6 +10,7 @@ description = {
}
dependencies = {
"lua-zmq",
"lua-llthreads",
}
build = {
type = "none",

Loading…
Cancel
Save