I have a C program that takes two args and outputs a number.
./a.out 2 3 (for example).
It does some computationally expensive operations, so I was wondering if I could use Python's multiprocessing library to run a bunch of the C programs and then compile all the numbers into a list or table or some data structure?
Thanks.
This is not a duplicate because my questions is how can I do it IN PARALLEL (E.G. MANY THREADS)!
I don't know how I can have 1 Python program running a few hundred C programs and capturing all of the output into a Python list. Using process is 1 for 1 it seems.