// 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?
}
Czy to jest ok aby ustawić thread=null
zachowując blokadę na nią?
Znalazłem ten samorodek w odrobinie kodu BB.
Czy jest jakiś powód, dla którego nie używasz Thread.interrupt(), ponieważ jest to obsługiwane przez biblioteki bazowe? –