Skip to content

Is there a way to pause and continue chunk execution #133

Answered by neolithos
pygmy-hippo asked this question in Q&A
Discussion options

You must be logged in to vote

Hui,

there is no easy answer for your question.

Basic rule: A lua chunk is compiled to machine code an will be executed on the calling thread.

To spawn and stop execution of an thread you need in minimum two threads (But you can also take use of the .net thread pooling or async/await pattern).

So, you need a control thread and at least one script thread, that/they works/synchronize together. The good part, NeoLua is pure .net. All knowledge of threading is your tool chain. The bad news, it is a lot of new stuff to learn.

Greatings.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@pygmy-hippo
Comment options

@neolithos
Comment options

@pygmy-hippo
Comment options

Answer selected by pygmy-hippo
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants