Is it possible to use events as a communication mechanism between threads?
Thread communication - events
Collapse
This topic is closed.
X
X
-
Ayende RahienTags: None -
Stephen Martin
Re: Thread communication - events
If by event you mean an event that can be raised from a class that can be
handled by another class that has added a handler for the event via a
delegate then the answer is no. An event of this type is executed in the
calling thread just like any method.
If by event you mean the kernel object called an event that is represented
by the Threading.Manua lResetEvent and Threading.AutoR esetEvent classes then
the answer is yes. These types of events are designed to be used to
synchronize multi-threaded behaviour or to signal some condition across
threads and so can be well suited to being part of an inter-thread
communication design.
"Ayende Rahien" <Ayende@no.spam > wrote in message
news:Op$YJiFsDH A.2448@TK2MSFTN GP12.phx.gbl...[color=blue]
> Is it possible to use events as a communication mechanism between threads?
>
>
>[/color]
Comment