|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Console.ReadLine AbortHello,
Is there any possibility to Abort a thread that is stopped on Console.ReadLine() call? Environment.Exit() is not a solution for me, unfortunately. Thanks in advance for any hints. Leszek Doniec Why do you use ReadLine() if you don't expect someone to type anything on
the Keybord? Much better is to let your thread wait on an event, when you want to terminate that thread you 'Set' the event state to signalled and your thread can resume or terminate you name it. Take a look at the WaitHandle class for more details. Willy. <leszek.don***@googlemail.com> wrote in message Show quote news:1139404419.006685.115720@g14g2000cwa.googlegroups.com... | Hello, | | Is there any possibility to Abort a thread that is stopped on | Console.ReadLine() call? | | Environment.Exit() is not a solution for me, unfortunately. | | Thanks in advance for any hints. | Leszek Doniec | |
|||||||||||||||||||||||