Steve <qe*****@hotmail.com> wrote:
I have two objects, each on a different thread. Object 1 periodically fires
an event, which Object 2 sinks. How can I marshall the event from Object 1
to the thread on Object 2?
Well, you don't need the kind of marshalling between threads which you
do between app domains - you just need to make sure that there are
appropriate memory barriers so you see the most recent data. Most of
the time, just the act of triggering something on another thread gives
you this for free.
It sounds like you want something at least *like* a producer/consumer
queue - see half way down
http://www.pobox.com/~skeet/csharp/t...eadlocks.shtml for an
example.
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too