private synchronized IRubyObject status(Ruby runtime) {
   if (threadImpl.isAlive()) {
     return RubyString.newStringShared(runtime, status.get().bytes);
   } else if (exitingException != null) {
     return runtime.getNil();
   } else {
     return runtime.getFalse();
   }
 }
示例#2
0
 /**
  * Returns the status of the global ``abort on exception'' condition. The default is false. When
  * set to true, will cause all threads to abort (the process will exit(0)) if an exception is
  * raised in any thread. See also Thread.abort_on_exception= .
  */
 @JRubyMethod(name = "abort_on_exception", meta = true)
 public static RubyBoolean abort_on_exception_x(IRubyObject recv) {
   Ruby runtime = recv.getRuntime();
   return runtime.isGlobalAbortOnExceptionEnabled() ? runtime.getTrue() : runtime.getFalse();
 }