For some reason, I tried to create an instance of the ManualResetEvent class
from the constructor of a class that derives from ContextBoundObject (for
automatic synchronization purposes), and after the call to "new
ManualResetEvent(false)" the watch window shows "undefied value" / null for
that instance, altough a call to Debug.Assert(event != null) doesn't assert!
Moreover, when I try to call Set on the event, an exception is thrown (can't
access a disposed object or something like that), even though I didn't
dispose of the event.
Is there a special problem regarding the use of ManualResetEvent in
ContextBoundObjects?
What is the reason for this?
Thanks.

RE: Using ManualResetEvent within a ContextBoundObject by AmirShitrit

AmirShitrit
Sun Mar 26 16:57:07 CST 2006

My mistake.
Please ignore this message.

"Amir Shitrit" wrote:

> For some reason, I tried to create an instance of the ManualResetEvent class
> from the constructor of a class that derives from ContextBoundObject (for
> automatic synchronization purposes), and after the call to "new
> ManualResetEvent(false)" the watch window shows "undefied value" / null for
> that instance, altough a call to Debug.Assert(event != null) doesn't assert!
> Moreover, when I try to call Set on the event, an exception is thrown (can't
> access a disposed object or something like that), even though I didn't
> dispose of the event.
> Is there a special problem regarding the use of ManualResetEvent in
> ContextBoundObjects?
> What is the reason for this?
> Thanks.