You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
572 B
14 lines
572 B
---@meta
|
|
---@diagnostic disable: missing-return
|
|
-- Type stubs for the native `task` module. Reference: docs/concurrency.md
|
|
|
|
task = {}
|
|
|
|
---Run each function as its own coroutine, drive them concurrently on the
|
|
---async runtime, and return each one's first result positionally once all
|
|
---have finished. Async stdlib calls (os.sleep, http, sqlite, prompts) inside
|
|
---the tasks suspend and overlap — wall-clock time is the longest task, not
|
|
---the sum. If a task raises, the first error is re-raised.
|
|
---@param ... fun(): any
|
|
---@return any ...
|
|
function task.join(...) end
|
|
|