mirror of
https://github.com/lune-org/lune.git
synced 2024-12-12 13:00:37 +00:00
Fix task cancel test being flaky due to task spawn scheduling
This commit is contained in:
parent
547d8f25f3
commit
f2c9213e3e
1 changed files with 3 additions and 1 deletions
|
@ -16,8 +16,10 @@ assert(not flag, "Cancel should handle non-immediate threads")
|
|||
|
||||
local flag2: number = 1
|
||||
task.spawn(function()
|
||||
task.wait(0.1)
|
||||
flag2 = 2
|
||||
task.wait()
|
||||
task.wait(0.2)
|
||||
flag2 = 3
|
||||
end)
|
||||
task.wait(0.2)
|
||||
assert(flag2 == 2, "Cancel should properly handle yielding threads")
|
||||
|
|
Loading…
Reference in a new issue