Skip to content

libUV threads in evo runtime #572

Answered by rdw-software
Jabadahut50 asked this question in Q&A
Discussion options

You must be logged in to vote

You're correct. The runtime is inherently single-threaded, meaning your Lua code runs on one thread. Despite that fact, libuv can absolutely make use of multiple threads, so scripts can offload certain tasks like I/O, timers, or other work when needed. Note that newly-spawned threads don't share the same Lua state and therefore don't have access to the main thread's global environment.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Jabadahut50
Comment options

@rdw-software
Comment options

Answer selected by Jabadahut50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants