3 ms·
Does nim have a concurrency story yet? That’s what gave me pause last time I checked it out.
by cshenton 8y ago
Does nim have a concurrency story yet? That’s what gave me pause last time I checked it out.
- dom96 8y agoYep. Concurrency is achieved via async await. Parallelism via `spawn`. Here is an example from my book that uses both: https://github.com/dom96/nim-in-action-code/blob/master/Chapter3/ChatApp/src/client.nim https://github.com/dom96/nim-in-action-code/blob/master/Chap...
- karmakaze 8y agoWhere is supporting use of multiple cores on the roadmap?
- mratsim 8y agoCompile with `--threads:on` and everything in the threadpool module are available. You can also use `CreateThread` for long-lived threads. Alternatively, you have an open-mp for loop that you can use with `||`: for i in 0||1000: doParallelSomething()