diff options
author | Matthew Wild <mwild1@gmail.com> | 2021-11-29 14:16:20 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2021-11-29 14:16:20 +0000 |
commit | f89a58330b584f8188b4a11f54c195dc29923051 (patch) | |
tree | 84913fb2d885658bd629c44404b95eaca990577e | |
parent | d46c43fbeb5e2fcc1d3cccf348ebb92f60f4bc2d (diff) | |
download | prosody-f89a58330b584f8188b4a11f54c195dc29923051.tar.gz prosody-f89a58330b584f8188b4a11f54c195dc29923051.zip |
util.startup: Initialize util.async at startup
-rw-r--r-- | util/startup.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/util/startup.lua b/util/startup.lua index ac4c2ac4..68f2d542 100644 --- a/util/startup.lua +++ b/util/startup.lua @@ -402,6 +402,14 @@ function startup.init_promise() promise.set_nexttick(function(f) return timer.add_task(0, f); end); end +function startup.init_async() + local async = require "util.async"; + + local timer = require "util.timer"; + async.set_nexttick(function(f) return timer.add_task(0, f); end); + async.set_schedule_function(timer.add_task); +end + function startup.init_data_store() require "core.storagemanager"; end @@ -655,6 +663,7 @@ function startup.prosody() startup.log_startup_warnings(); startup.load_secondary_libraries(); startup.init_promise(); + startup.init_async(); startup.init_http_client(); startup.init_data_store(); startup.init_global_protection(); |