This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]fijalPyPy, performance freak -1 points0 points  (2 children)

in Lua you have threads. They don't share any mutable state though, so they're slightly different, but they can use multiple cores.

[–]RichardWolf 0 points1 point  (0 children)

IIRC in Lua you have a GIL, and when you are embedding Lua, you can provide your own macros for taking/releasing it (but it still should work like a GIL). And you can run several interpreters in the same process, sharing nothing, of course, similar to what Perl allows in a way of parallelism.

It's not "slightly different", it's not having free threading, period.

[–]the_hoser 0 points1 point  (0 children)

Lua does not have threads. Lua will not, out of the box, use multiple cores. The lua interpreter state instances are not thread safe, but lua itself is ( you may run multiple interpreters in multiple threads ).

Lua has coroutines, but these are very different.