May 2017
Intermediate to advanced
416 pages
21h 33m
English
Lua provides an interesting feature named coroutines. Each coroutine has its own execution stack. The most important part is that we can suspend and resume the execution via coroutine.resume() and coroutine.yield(). The function stdnse.base() was introduced to help identify if the main script thread is still running. It returns the base coroutine of the running script.
You can learn more about coroutines from Lua's official documentation:
Read now
Unlock full access