Click here to Skip to main content
15,893,622 members

Comments by tnd2000 (Top 7 by date)

tnd2000 27-Apr-11 13:07pm View    
I didn't vote for your answer because I think the OP did not want to create 2 threads. He just wanted PauseCheck interrupted when timer ticks.
tnd2000 27-Apr-11 12:34pm View    
Is this a program requirement or did you want to do it to debug some issues?
Exception can only be caught one time only. Outer exception will only catch if inner exception doesn't handle it, or if another exception occurs while it's being handled.
try
{
try
{
dosomething
}
catch
{
innerchach;
}
catch
{
this code will only execute if an exception is thrown in inner catch
}
}
tnd2000 27-Apr-11 12:26pm View    
Debugger break when exception is thrown works like a break point. It just breaks execution, it does not kill the error handling codes.
tnd2000 27-Apr-11 12:13pm View    
I didn't vote, but I think the OP wanted to know how Monitor works. Not how different threads can communicate via events or sockets.
tnd2000 27-Apr-11 12:08pm View    
That's what TryEnter(fork, locked) does. When lock is false, it means another thread has locked/entered.

Maybe what you wanted is for the thread to be blocked? If so, use Monitor.Enter instead.

If you found problems with the code, you should post it in the discussion. http://rosettacode.org/wiki/Talk:Dining_philosophers