Re: Djikstra counting semaphore in c# for your review
From: TT (Tom Tempelaere) (_|\|_0$P_at_|/\|titi____AThotmail.com|/\|@P$0_|\|_)
Date: 06/25/04
- Next message: TT (Tom Tempelaere): "Re: Multi-threading article finally "finished" - reviewers welcome"
- Previous message: Daniel Pratt: "Re: Calling method in child form from MDI main form"
- In reply to: TT \(Tom Tempelaere\): "Re: Djikstra counting semaphore in c# for your review"
- Next in thread: TT (Tom Tempelaere): "Re: Djikstra counting semaphore in c# for your review"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 25 Jun 2004 08:40:03 -0700
"TT (Tom Tempelaere)" wrote:
> "William Stacey [MVP]" <staceywREMOVE@mvps.org> wrote in message
> news:eIDrO2bWEHA.1000@TK2MSFTNGP12.phx.gbl...
> > Update to the code? I did post a few changes after the first post. Let
> me
> > know what updates you would like to see.
> > --
> > William Stacey, MVP
>
[...]
> I think you should introduce Debug.Assert's at specific places for several
> reasons, which is my opinion and perhaps a question of style (or QOI).
[...]
> * Asserts could reveal nasty sneaky threading issues (because code execution
> isn't linear anymore). Throwing pulls you out of the context in which the
> state-error occured.
The only sad thing about Debug.Assert's in MT code is that they may trigger from multiple threads and that can become messy if one assert is directly followed by another from another thread.
[...]
Cheers
-- Tom Tempelaere.
- Next message: TT (Tom Tempelaere): "Re: Multi-threading article finally "finished" - reviewers welcome"
- Previous message: Daniel Pratt: "Re: Calling method in child form from MDI main form"
- In reply to: TT \(Tom Tempelaere\): "Re: Djikstra counting semaphore in c# for your review"
- Next in thread: TT (Tom Tempelaere): "Re: Djikstra counting semaphore in c# for your review"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|