[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: How can I do sethook() to all coroutines of a Lua state?
- From: Oliver Kroth <oliver.kroth@...>
- Date: Wed, 16 Jul 2014 12:33:34 +0200
Thank you Thijs,
it's unfortunately not only for debug purposes.
But I could bypass the problem by finding the main thread of the Lua
state and hooking the stop function there.
As it is the central 'player' in COPAS (every other thread yield()s back
to it and it resume()s to the next thread), it will stumble upon the
Am 16.07.2014 11:40, schrieb Thijs Schreijer:
For debug purposes, monkey patch the coroutine table functions, to
store all generated coroutines in a weak table in the registry. Thijs