Synchronizing dialog's from different threads

  • Thread starter Thread starter schaf
  • Start date Start date
S

schaf

Hi All!
I have a challenging task.
My app is split into two parts, a Base and a Main part.
Now I would like to create a controller class, which handles all
notifications (UI dialog similar to message boxes) from both parts.
The application contains multiple threads and therefore I need to
synchronize the creation of the notification to the main thread,
especially if I would like to handover the main UI-Handle to the
notification.show method.
But the first base function could send a notification before my main
UI is created. So I can not synchronize the notification to the UI
thread, neither by using Invoke nor by using the
SynchronizationContext. Is there a solution, where I can create a
SynchronizationContext for the main UI thread, before the UI creation
is finished?

Or is it not possible to synchronize such a behavior?

Thanks
Marcel
 
try thinking MSMQ (free, neah), UDP(free, nice) ehh TCP aswell, WCF
(free, limited), RDP(free, blah) (D)COM (arrgh) and other strange
words, then you can split, really split... physically
just a thought, didnt think this trough... thats your job... there
used to be things called semaphores, pipes, maibloxes (not gmail) or
shared common but that is for old pepole...
search the net on solving "mutex" prolems and it will come to you...
or at least you spend a lot of time at nice nerd sites ;)

//CY
 
Back
Top