when skynet.init require the loading module caused circular dependency
@@ -43,6 +43,7 @@ do
local loading_queue = loading[name]
if loading_queue then
+ assert(loading_queue.co ~= co, "circular dependency")
-- Module is in the init process (require the same mod at the same time in different coroutines) , waiting.
local skynet = require "skynet"
loading_queue[#loading_queue+1] = co
@@ -54,7 +55,7 @@ do
return m
end
- loading_queue = {}
+ loading_queue = {co = co}
loading[name] = loading_queue
local old_init_list = context[co]
