ThePhD / sol2

Sol3 (sol2 v3.0) - a C++ <-> Lua API wrapper with advanced features and top notch performance - is here, and it's great! Documentation:
http://sol2.rtfd.io/
MIT License
4.12k stars 500 forks source link

Forced yielding via instruction counting #1426

Open sigmareaver opened 1 year ago

sigmareaver commented 1 year ago

Implementations of this exist. For example, haproxy, which uses Lua's debug hooks. However, I couldn't find any mention of hooks in the Sol documentation. So I had some questions.

Has anyone tried using Lua's hooks with Sol2? Are there any potential reasons to not do it (e.g. it will mess up Sol2's internal state)? Are there any plans to create/expose a Sol2 version of the Lua C API hooks?

See also:

sagamusix commented 1 year ago

I'm using that functionality and it's not causing any issues for me at least.