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.
 
 
 
Robert G. Jakabosky daec802d96 Improved error message handling. 15 years ago
cmake Initial release of llthreads. 15 years ago
rockspecs Initial release of llthreads. 15 years ago
src Improved error message handling. 15 years ago
tests Improved error message handling. 15 years ago
.gitignore Initial release of llthreads. 15 years ago
CMakeLists.txt Initial release of llthreads. 15 years ago
README.md Improved error message handling. 15 years ago
llthreads.nobj.lua Initial release of llthreads. 15 years ago

README.md

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())