You can create multiple states, but without threads or multiple processes, you can only run one of them at a time. In addition, you cannot communicate between states in the Lua core, so you need to either write your own or find a library to perform any synchronization or interstate communication.
source share