mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Merge 5b25114d37
into 1297ccc537
This commit is contained in:
commit
008b7f5051
12 changed files with 229 additions and 78 deletions
|
@ -7166,12 +7166,12 @@ This allows you easy interoperability for delegating work to jobs.
|
|||
* When `func` returns the callback is called (in the normal environment)
|
||||
with all of the return values as arguments.
|
||||
* Optional: Variable number of arguments that are passed to `func`
|
||||
* Returns an `AsyncJob` async job.
|
||||
* `core.register_async_dofile(path)`:
|
||||
* Register a path to a Lua file to be imported when an async environment
|
||||
is initialized. You can use this to preload code which you can then call
|
||||
later using `core.handle_async()`.
|
||||
|
||||
|
||||
### List of APIs available in an async environment
|
||||
|
||||
Classes:
|
||||
|
@ -8002,6 +8002,15 @@ use the provided load and write functions for this.
|
|||
* `from_file(filename)`: Experimental. Like `from_string()`, but reads the data
|
||||
from a file.
|
||||
|
||||
`AsyncJob`
|
||||
----------
|
||||
An `AsyncJob` is a reference to a job to be run in an async environment.
|
||||
|
||||
### Methods
|
||||
* `cancel()`: try to cancel the job
|
||||
* Returns whether the job was cancelled.
|
||||
* A job can only be cancelled if it has not started.
|
||||
|
||||
`InvRef`
|
||||
--------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue