I have a strange problem I'm running the following C # code on Red Hat Enterprise Linux with Mono. What I'm seeing is that thread. Sleep (timeout eternal); Sometimes I do not sleep, what I hope is that the thread blocks on sleep, some other thread makes an interrupt (on the sleeping thread) and "the exception has been caught!" The line is printed.
What I see is printing "pre" and "post". (By the way, I'm making someone else's code and I would not use sleep but now I have to stay with it).
I looked online and trying to see if the situation where the thread is So sleep will not sleep but nothing can be found. Any suggestion is appreciated.
mj
try {Console.WriteLine ("pre"); Thread Sleep (timeout eternal); Console.WriteLine ("Post"); } Hold (ThreadInterruptedException E) {Console.WriteLine ("caught the exception!"); Actually, this was a bug in mono, see bug 683519;
Comments
Post a Comment