Thread communication - events

  • Thread starter Thread starter Ayende Rahien
  • Start date Start date
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.ManualResetEvent and Threading.AutoResetEvent 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.
 
Back
Top