November 15, 2005

Why are the "event" classes in .Net STILL broken?

Whilst I'm ranting about the little things...

You still can't create named versions of the .Net ManualResetEvent and AutoResetEvent, even in .Net 2.0. Wasn't everything going to be fixed in Whidbey?

Of course, I realise that you can "simply" access the underlying Win32 API to do it, but a) why should we have to? and b) it's not recommended that you do...

I guess the fact that the P/Invoke route isn't recommended is the reason for the dearth of nicely packaged up solutions to this problem; surely anyone who needs this functionality would write an object that wraps it up nicely rather than doing it "long hand" like this? I particularly like the way that example uses the hole in the encapsulation of ManualResetEvent to replace the event handle so that he can use WaitOne() on it...


Share this entry: Email it! | bookmark it! | digg it! | reddit!

Posted by Len at November 15, 2005 06:01 PM | Comments (0) | Categories : .Net , Geek Speak , Rants
Comments
Post a comment









Remember personal info?




Enter this code in the box below to prove that you're not some kind of automated spam robot...