On Fri, 09 Apr 2004 12:57:36 +0100, Jesper Matthiesen wrote:
Hey
In the run method of an io-thread I saw this:
while(Thread.currentThread() == thread) { ... }
Where 'thread' is an instance variable.
What is the purpose of this check?
Regards Jesper
To know when you have to escape the thread because of a change somewhere
(possibly in another thread) you can make a variable that points to the
current thread and once that change occurs, have it point elsewhere, after
which you escape the thread (let it end).
greets,
Wim