Я вижу это:
// thread is a member of this class
synchronized( this.thread )
{
this.thread.running = false;
this.thread.notifyAll(); // Wake up anything that was .waiting() on
// the thread
this.thread = null; // kill this thread reference.
// can you do that in a synchronized block?
}
Можно ли установить thread = null
, сохраняя блокировку это?
Я нашел этот самородок в фрагменте BB-кода.