Using ManualResetEvent within a ContextBoundObject

G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top