You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lua-llthreads/README.md

25 lines
526 B
Markdown

About
=====
A simple low-level Lua wrapper for pthreads.
Example usage
=============
local llthreads = require"llthreads"
local thread_code = [[
-- print thread's parameter.
print("CHILD: received params:", ...)
-- return all thread's parameters back to the parent thread.
return ...
]]
-- create child thread.
local thread = llthreads.new(thread_code, "number:", 1234, "nil:", nil, "bool:", true)
-- start joinable child thread.
assert(thread:start())
print("PARENT: child returned: ", thread:join())