Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions content/en-us/reference/engine/libraries/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ functions:
description: |
Accepts a function or a thread (as returned by coroutine.create) and
calls/resumes it immediately through the engine's scheduler. Arguments
after the first are sent to the function/thread. This function does not
return any value, even if the provided function returns one immediately.
after the first are sent to the function/thread.

This function is based on the fastSpawn pattern rather than being a
replacement for the deprecated global `spawn` function. It is recommended
Expand Down Expand Up @@ -52,15 +51,14 @@ functions:
code_samples:
- name: task.defer
summary: |
Calls/resumes a function/coroutine on the next resumption cycle.
Calls/resumes a function/coroutine at the end of the current resumption cycle.
description: |
Accepts a function or a thread (as returned by coroutine.create) and
defers it until the next
[resumption cycle](https://devforum.roblox.com/t/1240569), at which point
defers it until the end of the current
resumption cycle, at which point
it is resumed with the engine's scheduler like with
`Library.task.spawn()`. Arguments after the first are sent to the
function/thread. This function does not return any value, even if the
provided function returns one immediately.
function/thread.

This function should be used when a similar behavior to
`Library.task.spawn()` is desirable, but the thread does not need to run
Expand Down
Loading