X
Xarky
Hi,
I am writing a small program, that makes use of threads. Now in on
of the threads I have a critical section, where I am using the Monitor
to handle this.
*** Thread_1 *** started
for(...)
{
....doing some work
Monitor.Enter(Thread_1);
....doing a critical job
Monitor.Exit(Thread_1);
....doing some work
}
*** Another Thread....when pressing a button,
Thread1.Abort();
While Thread_1 is in the critical section, and I press the button to
abort, in some circumstances, the critical section is being interupted
without being finished.
Does the Thread.Abort() have that behaviour. If yes how can I get
around this problem?
Thanks in Advance
I am writing a small program, that makes use of threads. Now in on
of the threads I have a critical section, where I am using the Monitor
to handle this.
*** Thread_1 *** started
for(...)
{
....doing some work
Monitor.Enter(Thread_1);
....doing a critical job
Monitor.Exit(Thread_1);
....doing some work
}
*** Another Thread....when pressing a button,
Thread1.Abort();
While Thread_1 is in the critical section, and I press the button to
abort, in some circumstances, the critical section is being interupted
without being finished.
Does the Thread.Abort() have that behaviour. If yes how can I get
around this problem?
Thanks in Advance