Don't create a new lua state on every operation. Share a single state across the lifetime of the script interpreter. Add simple locking to prevent two threads from modifying the state concurrently.
3.8 KiB
3.8 KiB