@@ -5,6 +5,7 @@ local PROXY_UNLOADED = hash("proxy_unloaded")
5
5
local INIT = hash("init")
6
6
local ENABLE = hash("enable")
7
7
local ASYNC_LOAD = hash("async_load")
8
+ local SYNC_LOAD = hash("load")
8
9
local DISABLE = hash("disable")
9
10
local FINAL = hash("final")
10
11
local UNLOAD = hash("unload")
@@ -15,12 +16,14 @@ local UNLOAD_PROXY = hash("UNLOAD_PROXY")
15
16
go.property("proxy_name", hash("NAME"))
16
17
go.property("mount_key", hash("UNKNOWN"))
17
18
go.property("proxy_url", msg.url("#proxy"))
19
+ go.property("sync_load", false)
18
20
19
21
---@class atlas_proxy
20
22
---@field current_object hash|nil
21
23
---@field proxy_name hash
22
24
---@field mount_key hash
23
25
---@field proxy_url url
26
+ ---@field sync_load boolean
24
27
25
28
---Called when proxy unloaded
26
29
---@param self atlas_proxy
@@ -57,7 +60,11 @@ function on_message(self, message_id, message, sender)
57
60
elseif message_id == PROXY_UNLOADED then
58
61
on_proxy_unloaded(self, message, sender)
59
62
elseif message_id == LOAD_PROXY then
60
- msg.post(self.proxy_url, ASYNC_LOAD)
63
+ if self.sync_load then
64
+ msg.post(self.proxy_url, SYNC_LOAD)
65
+ else
66
+ msg.post(self.proxy_url, ASYNC_LOAD)
67
+ end
61
68
elseif message_id == UNLOAD_PROXY then
62
69
msg.post(self.proxy_url, DISABLE)
63
70
msg.post(self.proxy_url, FINAL)
0 commit comments