Concurrency model

Curious how Mojo is getting around the assumed presence of a GIL. What's the concurrency story?
5 Replies
Ryulord
Ryulord8mo ago
Mojo doesn't have a GIL so you don't need any weird tricks for concurrency
Alex Gunnarson
Alex Gunnarson8mo ago
Perfect, thank you! For compilation of / interop with existing Python libraries though, the assumption will presumably be that for stateful classes and functions, some sort of mutex or other concurrency construct will be needed, right?
sora
sora8mo ago
For interop, Mojo calls CPython, so things may effectively run with a GIL. If the code is ported to Mojo, then some sort of concurrency construct is going to be needed. In summary, existing libraries won't magically become thread safe
ModularBot
ModularBot8mo ago
Congrats @sora, you just advanced to level 12!
Alex Gunnarson
Alex Gunnarson8mo ago
Makes sense - thanks!
Want results from more Discord servers?
Add your server