theoretically fix MightyPirates/#3580

This commit is contained in:
Ocawesome101 2022-12-13 15:03:19 -05:00 committed by GitHub
parent 1c0dc67182
commit 8142d76e44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -265,6 +265,7 @@ function thread.create(fp, ...)
local old_status = t:status() local old_status = t:status()
mt.__status = "dead" mt.__status = "dead"
process.removeHandle(t, mt.attached) process.removeHandle(t, mt.attached)
process.removeHandle(mt.process, t)
if old_status ~= "dead" then if old_status ~= "dead" then
event.push("thread_exit") event.push("thread_exit")
end end