I am developing an instant messaging server and I have at any given time *n* spawned threads due to *n* connected clients. At any given time, any given spawned thread needs to be able to communicate with any other spawned thread by means of sending data (data can be anything, doesn't matter).

I have looked at solutions with Queues and Pipes; however, they all rely on a thread such as the main one to create a queue and/or pipe object and pass that to the constructors of the two spawned threads. In my scenario, all my threads have nothing in common and do not share any references to the same objects in memory or anything like that.

How can I possibly set up some kind of communication channel between two threads that exhibit the behaviours of the ones I have described?