-
Notifications
You must be signed in to change notification settings - Fork 36
Labels
runtimeWork in the C++ runtime portion of the codeWork in the C++ runtime portion of the code
Milestone
Description
The return value of task.spawn doesn't actually seem to return a thread. At least not in a way that coroutine.status recognizes.
When attempting to pass the thread in, coroutine.status errors with invalid argument #1 to 'status' (thread expected, got function)
Minimal repro:
-- scripts/repro.luau
local task = require("@lute/task")
local thread = task.spawn(function()
print("do something for a while")
task.wait(2)
print("done")
end)
local status = coroutine.status(thread)
print(status)And here's the output:
➜ flipbook git:(main) ✗ lute --version
0.1.0-nightly.20251104
➜ flipbook git:(main) ✗ lute scripts/repro.luau
do something for a while
./scripts/repro.luau:9: invalid argument #1 to 'status' (thread expected, got function)
stacktrace:
[C] function status
./scripts/repro.luau:9
done
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
runtimeWork in the C++ runtime portion of the codeWork in the C++ runtime portion of the code