2
0

init.lua 708 B

123456789101112131415161718
  1. return {
  2. summary = 'A separate thread of execution that can run code in parallel with other threads.',
  3. description = [[
  4. A Thread is an object that runs a chunk of Lua code in the background. Threads are completely
  5. isolated from other threads, meaning they have their own Lua context and can't access the
  6. variables and functions of other threads. Communication between threads is limited and is
  7. accomplished by using `Channel` objects.
  8. To get `require` to work properly, add `require 'lovr.filesystem'` to the thread code.
  9. ]],
  10. extends = 'Object',
  11. constructor = 'lovr.thread.newThread',
  12. related = {
  13. 'lovr.threaderror',
  14. 'lovr.system.getCoreCount',
  15. 'Channel'
  16. }
  17. }