Skip to content

Add ability to set hooks without include standard library #221

@AJBuilder

Description

@AJBuilder

This sort of feature is the determining factor making me unable to use this library for my use-case.

I need preemptability— to pause and resume the running script so it doesn't stop the calling c# thread. I can't have one script running user written code to freeze the whole system with an infinite loop. I need to be able to run multiple Lua threads on the same thread synchronously. Run one a little bit then switch.

There is a way to do this with debug hooks. Create a hook that runs every few lines that yields. However, I don't see a way to do this without exposing the debug library to the environment.

In the C implementation, I'm fairly certain it is possible to be able to set hooks without exposing the library. Without this I have to resort to native bindings like NLua.

Unless there is another option for this behavior that I am unaware of?

(Awesome work btw. Excited to try 0.5. Especially this feature.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions