3 ms·
Yep. 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-c
by dom96 8y ago
Yep. 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()