# HG changeset patch # User Matthew Wild # Date 1529931197 -3600 # Node ID ed0891383e7883bb6d891c2d823efc5b632a2c1c # Parent 89f6b2a2bec34fbb4745acb80f3006a25ff07638 util.async: Copy hooks from main thread into coroutines diff -r 89f6b2a2bec3 -r ed0891383e78 util/async.lua --- 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