-
Singleton Objects
Hi,
I have a question I was hoping you could also answer for me... I've created a singleton object on an ActiveX EXE server and created a client to connect to it, and so far they work fine. When opening multiple clients, they all see the same singleton object and all receive events.
My question is this: The singleton object only works when the thread count is set to 1. However, if there was a thread per object the singleton model breaks down. I know the reason for this, but I was wondering if there was any way possible to have a multithreaded client/server and still preserve the singleton model? Thank You.
-
Hmm I think you could either have the singleton object call another activeX EXE to handle the asynch stuff or piggybacking a timer may work but I'm not sure if they are in the same process space. The coffee example on the MSDN CD for multithreading.