Dirk Reske <_F*******@gmx.net> wrote:
I have a class, which starts a new thread.
from this thread events can be fired.
How can i fire this event in the class-creator-thread?
Your creator thread will need to be running some kind of message pump,
whether your own or the normal Windows one. If your creator thread is a
UI thread, you can use Control.Invoke/Control.BeginInvoke. Otherwise,
you might want to use a producer/consumer type queue, with the creator
thread waiting on the queue and the other thread putting work items on
the queue.
See
http://www.pobox.com/~skeet/csharp/t...eadlocks.shtml for an
example of a producer/consumer queue.
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too