Running many child processes in parallel
Part of my program creates a bunch of child processes and has them run in the background, roughly as follows
I want to know
I want to know
- What's the proper way to dispose currently running processes in case it's needed (can I simply try
p.Kill()followed byp.Dispose()?) - Is there a way to limit the number of threads spawned by foreach in this scenario?