|
LifeLua 21-08-2025
Documentation for LifeLua, a Lua interpreter for the PS Vita
|
Running a function at the same time as the rest of your app. More...
Every function that takes a thread as its first parameter can also be called as a method, e.g. t:start() and t:wait().
Functions | |
| thread | thread.new (function func, string name) |
| nil | thread.start (thread thread) |
| nil | thread.wait (thread thread) |
| nil | thread.waitcb (thread thread) |
| nil | thread.exit () |
| nil | thread.exitdelete () |
| nil thread.exit | ( | ) |
Ends the thread that calls it. Call it from inside a thread function to stop it early.
| nil thread.exitdelete | ( | ) |
Ends the thread that calls it and frees its resources. Call it from inside a thread function to stop it early.
| thread thread.new | ( | function | func, |
| string | name ) |
Creates a new thread. It doesn't run until you call thread.start().
| func | The function the thread will run |
| name | Name of the thread, only useful for debugging (optional, default: "LifeLua Thread") |
| nil thread.start | ( | thread | thread | ) |
Starts running a thread
Method form: t:start()
| thread | The thread |
| nil thread.wait | ( | thread | thread | ) |
Waits until a thread has finished. The code calling this stops until then.
Method form: t:wait()
| thread | The thread |
| nil thread.waitcb | ( | thread | thread | ) |
Waits until a thread has finished, like thread.wait(), but lets system callbacks run while waiting
Method form: t:waitcb()
| thread | The thread |