re PR libgcj/22211 ([4.0 only] Thread.interrupt sometimes causes abort if thread is already dead)
PR libgcj/22211: * testsuite/libjava.lang/pr22211.java: New file. * java/lang/natThread.cc (finish_): Synchronize when updating alive_flag. (_Jv_AttachCurrentThread): Likewise. (interrupt): Only call _Jv_ThreadInterrupt if thread is alive. * java/lang/Thread.java (isAlive): Now synchronized. From-SVN: r101430
This commit is contained in:
parent
9fb93f8966
commit
3af9ac15a9
4 changed files with 30 additions and 4 deletions
|
@ -550,7 +550,7 @@ public class Thread implements Runnable
|
|||
*
|
||||
* @return whether this Thread is alive
|
||||
*/
|
||||
public final boolean isAlive()
|
||||
public final synchronized boolean isAlive()
|
||||
{
|
||||
return alive_flag;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue