Changeset

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
parents 8926:89f6b2a2bec3
children 8928:d41f8ce67c8e
files util/async.lua
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
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