There is no connection between Threads in .NET. However, in the .NET 4 Task / Task<T> classes, there are parent-child relationships that are in many ways better suited for concurrency than directly using threads.
It is said ...
I urgently need to get the parent stream from the actual stream, and there is no way to pass this piece of information.
The main way to transfer information to a stream is to implement a SynchronizationContext . This is usually done using the user interface interfaces to implement ISynchronizeInvoke for objects inside this stream ( i.e .: Control.Invoke ). This is not something that is usually done manually, and requires a highly customizable thread that supports its own messaging pump or a process queue that is constantly being processed.
I would recommend considering changing this producer / consumer scenario instead and polling your child threads for new processing elements. This eliminates the need to know about βparentsβ - since any thread can add to the processing queue. The BlockingCollection<T> class is ideal for this scenario.
source share