aboutsummaryrefslogtreecommitdiffstats
path: root/util/async.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2018-06-25 13:53:17 +0100
committerMatthew Wild <mwild1@gmail.com>2018-06-25 13:53:17 +0100
commitbd47ba30c2e460087ec8f3eb9ff829a20dec92b7 (patch)
treef25041ad436171a45cf43b1afee20f5b878f8d5c /util/async.lua
parent150079e0588f3f5b07a21443a892ef35271398c7 (diff)
downloadprosody-bd47ba30c2e460087ec8f3eb9ff829a20dec92b7.tar.gz
prosody-bd47ba30c2e460087ec8f3eb9ff829a20dec92b7.zip
util.async: Copy hooks from main thread into coroutines
Diffstat (limited to 'util/async.lua')
-rw-r--r--util/async.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/util/async.lua b/util/async.lua
index 46a64ecb..0d19af6e 100644
--- a/util/async.lua
+++ b/util/async.lua
@@ -126,6 +126,7 @@ local function runner_create_thread(func, self)
func(coroutine.yield("ready", self));
end
end);
+ debug.sethook(thread, debug.gethook());
assert(coroutine.resume(thread, self)); -- Start it up, it will return instantly to wait for the first input
return thread;
end