Skip to content

dvv/luvit-worker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Worker API for Luvit

Build Status

"Unblock" blocking API.

Usage

local run = require('worker').run

--
-- call [lua_CFunction](http://pgl.yoyo.org/luai/i/lua_CFunction) in separate state
--

run(func, arg..., function (err, ...)
  -- function returned
  if err then
    p('ERROR', err)
  else
    p('RESULTS', ...)
  end
end)

--
-- execution continues nomatter whether function were blocking or not
--

print('This is printed before RESULTS or ERROR')

License

MIT

About

Worker API for Luvit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published