harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <g...@pobox.com>
Subject Re: svn commit: r506286 - /harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Thread.java
Date Tue, 13 Feb 2007 20:21:08 GMT
Weldon,

Just curious - is it harmful to call VMThreadManager.stop() if the  
thread isn't alive?

geir


On Feb 12, 2007, at 12:25 AM, wjwashburn@apache.org wrote:

> Author: wjwashburn
> Date: Sun Feb 11 21:25:22 2007
> New Revision: 506286
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=506286
> Log:
> H2218, check if thread is alive before attempting
> build, build test pass on winxp, RHEL 4, w/ gcc 4.0.2
>
>
> Modified:
>     harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/ 
> javasrc/java/lang/Thread.java
>
> Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/ 
> javasrc/java/lang/Thread.java
> URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/ 
> vmcore/src/kernel_classes/javasrc/java/lang/Thread.java? 
> view=diff&rev=506286&r1=506285&r2=506286
> ====================================================================== 
> ========
> --- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/ 
> javasrc/java/lang/Thread.java (original)
> +++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/ 
> javasrc/java/lang/Thread.java Sun Feb 11 21:25:22 2007
> @@ -838,10 +838,12 @@
>              throw new NullPointerException("The argument is null!");
>          }
>          synchronized (lock) {
> -            int status = VMThreadManager.stop(this, throwable);
> -            if (status != VMThreadManager.TM_ERROR_NONE) {
> -                throw new InternalError(
> -                    "Thread Manager internal error " + status);
> +            if (isAlive()) {
> +                int status = VMThreadManager.stop(this, throwable);
> +                if (status != VMThreadManager.TM_ERROR_NONE) {
> +                    throw new InternalError(
> +                        "Thread Manager internal error " + status);
> +                }
>              }
>          }
>      }
>
>


Mime
View raw message