What I am looking to do is as follows:
1. Start TCP socket listener on another thread (so it does not block my app.)
2. Start 1..n other processes on other threads which will send data to my listener
3. Stop my listener when all of the other processes have finished.
How would I achieve this using the Parallel library in .Net ?
I presume I need to keep a reference to the initial spawned thread somehow and terminate it when a counter has been reached or something?
What about using a child / parent tasks:
From
http://msdn.microsoft.com/en-us/library/dd537609.aspx