Software /
code /
prosody
Comparison
util/async.lua @ 12975:d10957394a3c
util: Prefix module imports with prosody namespace
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 17 Mar 2023 16:23:16 +0100 |
parent | 12310:91af1697ddd8 |
child | 13330:49ecfb070240 |
comparison
equal
deleted
inserted
replaced
12974:ba409c67353b | 12975:d10957394a3c |
---|---|
1 local logger = require "util.logger"; | 1 local logger = require "prosody.util.logger"; |
2 local log = logger.init("util.async"); | 2 local log = logger.init("util.async"); |
3 local new_id = require "util.id".short; | 3 local new_id = require "prosody.util.id".short; |
4 local xpcall = require "util.xpcall".xpcall; | 4 local xpcall = require "prosody.util.xpcall".xpcall; |
5 | 5 |
6 local function checkthread() | 6 local function checkthread() |
7 local thread, main = coroutine.running(); | 7 local thread, main = coroutine.running(); |
8 if not thread or main then | 8 if not thread or main then |
9 error("Not running in an async context, see https://prosody.im/doc/developers/util/async"); | 9 error("Not running in an async context, see https://prosody.im/doc/developers/util/async"); |