Software /
code /
prosody
Diff
util/async.lua @ 8927:ed0891383e78
util.async: Copy hooks from main thread into coroutines
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 25 Jun 2018 13:53:17 +0100 |
parent | 8788:7a9b680a79fb |
child | 8976:92f0876b9230 |
line wrap: on
line diff
--- a/util/async.lua Sat Jun 23 18:59:21 2018 +0200 +++ b/util/async.lua Mon Jun 25 13:53:17 2018 +0100 @@ -126,6 +126,7 @@ 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