[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Announcement of Lua Power Patch: Interpreter Bailout Flag
- From: Asko Kauppi <askok@...>
- Date: Thu, 17 Jul 2008 11:36:06 +0300
Lanes has a cancellation method for running lanes (= OS threads =
independent Lua states).
It does not have per-thread CPU consumption detection, though.
ketmar kirjoitti 17.7.2008 kello 0:53:
On Wed, 16 Jul 2008 14:42:12 -0700
Chip Salzenberg <email@example.com> wrote:
If a way could be found to atomically install new debug hook settings
from another thread, then sure, that'd be a fine solution to the
"STOP NOW!" problem.
you can set 'count hook' after creating Lua state and then
atomically check 'stop now' flag in this hook. it wouldn't be
stop' (without sacrificing performance), but it can work fine (and it
works for me). the big plus (i think) that i can see where script was
interrupted (with help of debug traceback). just fine-tune counter
(once per 100 VM commands, once per 1000, etc). i think this can solve
most of the problems.