> To do some simple parallel processing I have two nim programs, where one 
> simply runs a number of the other through osproc's startProcess,

You should probably use threads instead of external processes.

At your leisure, you can go for a lower-level approach using [os threading API 
](https://nim-lang.org/docs/threads.html), coupled with Channel (or the 
messaging queue of your choice) for synchronisation.

You can also use threadpool + Future / FlowVar with either

  * <https://nim-lang.org/docs/threadpool.html>
  * <https://github.com/yglukhov/asyncthreadpool>



Finally, ti's probably worth taking a look at 
<https://github.com/mratsim/weave>/ for parallization.

Reply via email to