Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Lua has hooks, which are callbacks that can be registered for a variety of different events, including every N instructions, and every call can decide to terminate the whole thing with an error. This mechanism can be used for different purposes, including tracing, some kind of performance stats and, of course, cancellation. I always found it to be a nice general solution.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: