4 ms·
Odin has numerous concurrency primitives in the core library. And the synchronization primitives are based on a the modern construct of a `Futex`: https://gith
by gingerBill 4y ago
Odin has numerous concurrency primitives in the core library. And the synchronization primitives are based on a the modern construct of a `Futex`:
https://github.com/odin-lang/Odin/tree/master/core/sync https://github.com/odin-lang/Odin/tree/master/core/sync
https://github.com/odin-lang/Odin/tree/master/core/thread https://github.com/odin-lang/Odin/tree/master/core/thread
We are planning on adding channels to the core library but we have not added them yet since there are quite a few different forms (SPSC, SPMC, MPSC, MPMC).
One thing that I would like to bring up is that Odin differs from Go in that it does not have `go`routines (green threads). These require automatic memory management and a huge runtime to make them possible. And you cannot easily add them after the fact to a language either without huge issues. Channels are very basic things but the thing that makes Go's concurrency powerful are the `go`routines, not the channels.
- Tozen 4y agoThank you for the additional information and correction.