Click here to Skip to main content
15,888,136 members
Home / Discussions / C#
   

C#

 
GeneralRe: Thread.Sleep is NOT evil Pin
devvvy19-Feb-13 14:07
devvvy19-Feb-13 14:07 
AnswerRe: Thread.Sleep is NOT evil Pin
GuyThiebaut18-Feb-13 21:49
professionalGuyThiebaut18-Feb-13 21:49 
GeneralRe: Thread.Sleep is NOT evil Pin
Pete O'Hanlon18-Feb-13 22:35
mvePete O'Hanlon18-Feb-13 22:35 
GeneralRe: Thread.Sleep is NOT evil Pin
GuyThiebaut18-Feb-13 23:17
professionalGuyThiebaut18-Feb-13 23:17 
GeneralRe: Thread.Sleep is NOT evil Pin
devvvy19-Feb-13 1:45
devvvy19-Feb-13 1:45 
GeneralRe: Thread.Sleep is NOT evil Pin
Pete O'Hanlon19-Feb-13 2:03
mvePete O'Hanlon19-Feb-13 2:03 
GeneralRe: Thread.Sleep is NOT evil Pin
devvvy19-Feb-13 12:44
devvvy19-Feb-13 12:44 
GeneralRe: Thread.Sleep is NOT evil Pin
Pete O'Hanlon19-Feb-13 13:13
mvePete O'Hanlon19-Feb-13 13:13 
devvvy wrote:
But this detracts the discussion to get to the bottom

No it doesn't. It shows alternatives. The reason people are using the term "Evil" (and I think this is the word you're getting hung up on) is because threading isn't easy. It isn't trivial. But Thread.Sleep makes it appear as though it is because it's a convenience to hide the complexity, and sooner or later, this complexity creeps out and rips your face clean off. Subtle bugs creep in and they are hugely difficult to track down because they are timing based, and that timing is not predictable, because Thread.Sleep isn't predictable. The OS can actually do different things depending on what you've done with it.
I was brought up to respect my elders. I don't respect many people nowadays.

CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

GeneralRe: Thread.Sleep is NOT evil Pin
devvvy19-Feb-13 13:32
devvvy19-Feb-13 13:32 
GeneralRe: Thread.Sleep is NOT evil Pin
GuyThiebaut19-Feb-13 2:07
professionalGuyThiebaut19-Feb-13 2:07 
GeneralRe: Thread.Sleep is NOT evil Pin
devvvy19-Feb-13 12:41
devvvy19-Feb-13 12:41 
GeneralRe: Thread.Sleep is NOT evil Pin
BobJanova18-Feb-13 23:56
BobJanova18-Feb-13 23:56 
GeneralRe: Thread.Sleep is NOT evil Pin
Pete O'Hanlon19-Feb-13 0:02
mvePete O'Hanlon19-Feb-13 0:02 
GeneralRe: Thread.Sleep is NOT evil Pin
devvvy19-Feb-13 1:55
devvvy19-Feb-13 1:55 
AnswerRe: Thread.Sleep is NOT evil Pin
Eddy Vluggen18-Feb-13 22:32
professionalEddy Vluggen18-Feb-13 22:32 
GeneralRe: Thread.Sleep is NOT evil Pin
DaveyM6919-Feb-13 0:08
professionalDaveyM6919-Feb-13 0:08 
GeneralRe: Thread.Sleep is NOT evil Pin
devvvy19-Feb-13 1:44
devvvy19-Feb-13 1:44 
QuestionError in connection string Pin
Azza ALbelushi18-Feb-13 3:56
Azza ALbelushi18-Feb-13 3:56 
AnswerRe: Error in connection string Pin
Deflinek18-Feb-13 4:40
Deflinek18-Feb-13 4:40 
GeneralRe: Error in connection string Pin
Azza ALbelushi18-Feb-13 4:53
Azza ALbelushi18-Feb-13 4:53 
GeneralRe: Error in connection string Pin
Deflinek18-Feb-13 22:32
Deflinek18-Feb-13 22:32 
QuestionEvil Thread.Abort and using(TransactionScope) -- what will happen? Pin
devvvy18-Feb-13 2:41
devvvy18-Feb-13 2:41 
AnswerRe: Evil Thread.Abort and using(TransactionScope) -- what will happen? Pin
BobJanova18-Feb-13 2:59
BobJanova18-Feb-13 2:59 
AnswerRe: Evil Thread.Abort and using(TransactionScope) -- what will happen? Pin
Eddy Vluggen18-Feb-13 3:01
professionalEddy Vluggen18-Feb-13 3:01 
AnswerRe: Evil Thread.Abort and using(TransactionScope) -- what will happen? Pin
Pete O'Hanlon18-Feb-13 4:51
mvePete O'Hanlon18-Feb-13 4:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.