Skip to content

Commit 41e323e

Browse files
Co-authored-by: Wires77 <Wires77@users.noreply.github.com>
1 parent d44d5c3 commit 41e323e

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

src/Modules/Common.lua

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,19 @@ if launch.devMode and profiler == nil then
4242
ConPrintf("Unable to Load Profiler")
4343
end
4444

45+
-- Optimize coroutines to run at full framerate
46+
local co_create = coroutine.create
47+
local active_coroutines = setmetatable({}, { __mode = "k" })
48+
function coroutine.create(func)
49+
local co = co_create(func)
50+
active_coroutines[co] = true
51+
return co
52+
end
53+
54+
function coroutine._list()
55+
return active_coroutines
56+
end
57+
4558
-- Class library
4659
common.classes = { }
4760
local function addSuperParents(class, parent)

0 commit comments

Comments
 (0)