The only time I’ve seen coroutine yielding/resuming and waits mix was when I tried making a cancellable wait
local thread = coroutine.running()
local resumed = false
spawn(function()
-- something happens
if not resumed then
coroutine.resume(thread)
end
end)
wait(5)
resumed = true
but this is a coroutine resuming a wait, not a wait resuming a yield. I’m not sure how else somebody would be mixing waits with yields/resumes or when somebody would write coroutine.yield()
instead of wait()
if they for whatever reason expect them to behave exactly the same. Do you know how people used to rely on this?