mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-22 02:53:09 +00:00
when skynet.init require the loading module caused circular dependency (#1403)
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user