is luau state thread affined? #1628
Answered
by
vegorov-rbx
PonasKovas
asked this question in
Q&A
-
if you create the main lua_State in one thread, and then move to use it in another (os thread), is it gonna be fine? im not talking about concurrent usage, just creating in one and using in another. |
Beta Was this translation helpful? Give feedback.
Answered by
vegorov-rbx
Jan 27, 2025
Replies: 1 comment
-
There is no state attached to an OS thread (no TLS for example), so it is completely safe to use the same lua_State from different OS threads at different points in time. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
PonasKovas
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is no state attached to an OS thread (no TLS for example), so it is completely safe to use the same lua_State from different OS threads at different points in time.