Software /
code /
prosody
Changeset
11963:f5c6be4a3ecc
util.startup: Initialize util.async at startup
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 29 Nov 2021 14:16:20 +0000 |
parents | 11962:9a70a543c727 |
children | 11964:563ee7969f6c |
files | util/startup.lua |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/util/startup.lua Mon Nov 29 14:14:30 2021 +0000 +++ b/util/startup.lua Mon Nov 29 14:16:20 2021 +0000 @@ -402,6 +402,14 @@ 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 @@ 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();