Browse Source

Thread require note;

bjorn 4 years ago
parent
commit
77a7ebbcbb
3 changed files with 682 additions and 714 deletions
  1. 679 714
      api/init.lua
  2. 2 0
      api/lovr/thread/Thread/init.lua
  3. 1 0
      api/lovr/thread/init.lua

File diff suppressed because it is too large
+ 679 - 714
api/init.lua


+ 2 - 0
api/lovr/thread/Thread/init.lua

@@ -5,6 +5,8 @@ return {
     isolated from other threads, meaning they have their own Lua context and can't access the
     isolated from other threads, meaning they have their own Lua context and can't access the
     variables and functions of other threads.  Communication between threads is limited and is
     variables and functions of other threads.  Communication between threads is limited and is
     accomplished by using `Channel` objects.
     accomplished by using `Channel` objects.
+
+    To get `require` to work properly, add `require 'lovr.filesystem'` to the thread code.
   ]],
   ]],
   constructor = 'lovr.thread.newThread',
   constructor = 'lovr.thread.newThread',
   related = {
   related = {

+ 1 - 0
api/lovr/thread/init.lua

@@ -14,6 +14,7 @@ return {
 
 
     - Threads run in a bare Lua environment.  The `lovr` module (and any of lovr's modules) need to
     - Threads run in a bare Lua environment.  The `lovr` module (and any of lovr's modules) need to
       be required before they can be used.
       be required before they can be used.
+      - To get `require` to work properly, add `require 'lovr.filesystem'` to the thread code.
     - Threads are completely isolated from other threads.  They do not have access to the variables
     - Threads are completely isolated from other threads.  They do not have access to the variables
       or functions of other threads, and communication between threads must be coordinated through
       or functions of other threads, and communication between threads must be coordinated through
       `Channel` objects.
       `Channel` objects.

Some files were not shown because too many files changed in this diff