public class org.jruby.internal.runtime.ThreadService
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.jruby.internal.runtime.ThreadService
super_class: java.lang.Object
{
private final org.jruby.Ruby runtime;
descriptor: Lorg/jruby/Ruby;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private org.jruby.runtime.ThreadContext mainContext;
descriptor: Lorg/jruby/runtime/ThreadContext;
flags: (0x0002) ACC_PRIVATE
private java.lang.ThreadLocal<java.lang.ref.SoftReference<org.jruby.runtime.ThreadContext>> localContext;
descriptor: Ljava/lang/ThreadLocal;
flags: (0x0002) ACC_PRIVATE
Signature: Ljava/lang/ThreadLocal<Ljava/lang/ref/SoftReference<Lorg/jruby/runtime/ThreadContext;>;>;
private java.lang.ThreadGroup rubyThreadGroup;
descriptor: Ljava/lang/ThreadGroup;
flags: (0x0002) ACC_PRIVATE
private final java.util.Map<java.lang.Object, org.jruby.RubyThread> rubyThreadMap;
descriptor: Ljava/util/Map;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/Map<Ljava/lang/Object;Lorg/jruby/RubyThread;>;
private final java.util.concurrent.locks.ReentrantLock criticalLock;
descriptor: Ljava/util/concurrent/locks/ReentrantLock;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.util.concurrent.atomic.AtomicLong threadCount;
descriptor: Ljava/util/concurrent/atomic/AtomicLong;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
static final boolean $assertionsDisabled;
descriptor: Z
flags: (0x1018) ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc Lorg/jruby/internal/runtime/ThreadService;
invokevirtual java.lang.Class.desiredAssertionStatus:()Z
ifne 1
iconst_1
goto 2
StackMap locals:
StackMap stack:
1: iconst_0
StackMap locals:
StackMap stack: int
2: putstatic org.jruby.internal.runtime.ThreadService.$assertionsDisabled:Z
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>(org.jruby.Ruby);
descriptor: (Lorg/jruby/Ruby;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new java.util.concurrent.locks.ReentrantLock
dup
invokespecial java.util.concurrent.locks.ReentrantLock.<init>:()V
putfield org.jruby.internal.runtime.ThreadService.criticalLock:Ljava/util/concurrent/locks/ReentrantLock;
2: aload 0
new java.util.concurrent.atomic.AtomicLong
dup
lconst_0
invokespecial java.util.concurrent.atomic.AtomicLong.<init>:(J)V
putfield org.jruby.internal.runtime.ThreadService.threadCount:Ljava/util/concurrent/atomic/AtomicLong;
3: aload 0
aload 1
putfield org.jruby.internal.runtime.ThreadService.runtime:Lorg/jruby/Ruby;
4: aload 0
new java.lang.ThreadLocal
dup
invokespecial java.lang.ThreadLocal.<init>:()V
putfield org.jruby.internal.runtime.ThreadService.localContext:Ljava/lang/ThreadLocal;
5: aload 0
new java.lang.ThreadGroup
dup
new java.lang.StringBuilder
dup
ldc "Ruby Threads#"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.Object.hashCode:()I
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.ThreadGroup.<init>:(Ljava/lang/String;)V
putfield org.jruby.internal.runtime.ThreadService.rubyThreadGroup:Ljava/lang/ThreadGroup;
6: goto 9
StackMap locals: org.jruby.internal.runtime.ThreadService org.jruby.Ruby
StackMap stack: java.lang.SecurityException
7: pop
8: aload 0
invokestatic java.lang.Thread.currentThread:()Ljava/lang/Thread;
invokevirtual java.lang.Thread.getThreadGroup:()Ljava/lang/ThreadGroup;
putfield org.jruby.internal.runtime.ThreadService.rubyThreadGroup:Ljava/lang/ThreadGroup;
9: StackMap locals:
StackMap stack:
aload 0
new java.util.WeakHashMap
dup
invokespecial java.util.WeakHashMap.<init>:()V
invokestatic java.util.Collections.synchronizedMap:(Ljava/util/Map;)Ljava/util/Map;
putfield org.jruby.internal.runtime.ThreadService.rubyThreadMap:Ljava/util/Map;
10: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lorg/jruby/internal/runtime/ThreadService;
0 11 1 runtime Lorg/jruby/Ruby;
Exception table:
from to target type
5 6 7 Class java.lang.SecurityException
MethodParameters:
Name Flags
runtime final
public void teardown();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
new java.lang.ThreadLocal
dup
invokespecial java.lang.ThreadLocal.<init>:()V
putfield org.jruby.internal.runtime.ThreadService.localContext:Ljava/lang/ThreadLocal;
1: aload 0
aconst_null
putfield org.jruby.internal.runtime.ThreadService.mainContext:Lorg/jruby/runtime/ThreadContext;
2: aload 0
getfield org.jruby.internal.runtime.ThreadService.rubyThreadMap:Ljava/util/Map;
invokeinterface java.util.Map.clear:()V
3: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/jruby/internal/runtime/ThreadService;
public void initMainThread();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=1, args_size=1
start local 0 0: aload 0
aload 0
getfield org.jruby.internal.runtime.ThreadService.runtime:Lorg/jruby/Ruby;
invokestatic org.jruby.runtime.ThreadContext.newContext:(Lorg/jruby/Ruby;)Lorg/jruby/runtime/ThreadContext;
putfield org.jruby.internal.runtime.ThreadService.mainContext:Lorg/jruby/runtime/ThreadContext;
1: aload 0
getfield org.jruby.internal.runtime.ThreadService.localContext:Ljava/lang/ThreadLocal;
new java.lang.ref.SoftReference
dup
aload 0
getfield org.jruby.internal.runtime.ThreadService.mainContext:Lorg/jruby/runtime/ThreadContext;
invokespecial java.lang.ref.SoftReference.<init>:(Ljava/lang/Object;)V
invokevirtual java.lang.ThreadLocal.set:(Ljava/lang/Object;)V
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/jruby/internal/runtime/ThreadService;
public final org.jruby.runtime.ThreadContext getCurrentContext();
descriptor: ()Lorg/jruby/runtime/ThreadContext;
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
Code:
stack=2, locals=3, args_size=1
start local 0 0: StackMap locals:
StackMap stack:
aload 0
getfield org.jruby.internal.runtime.ThreadService.localContext:Ljava/lang/ThreadLocal;
invokevirtual java.lang.ThreadLocal.get:()Ljava/lang/Object;
checkcast java.lang.ref.SoftReference
astore 2
start local 2 1: aload 2
ifnonnull 4
2: aload 0
invokevirtual org.jruby.internal.runtime.ThreadService.adoptCurrentThread:()Lorg/jruby/RubyThread;
invokevirtual org.jruby.RubyThread.getContext:()Lorg/jruby/runtime/ThreadContext;
astore 1
start local 1 3: goto 7
end local 1 4: StackMap locals: org.jruby.internal.runtime.ThreadService top java.lang.ref.SoftReference
StackMap stack:
aload 2
invokevirtual java.lang.ref.SoftReference.get:()Ljava/lang/Object;
checkcast org.jruby.runtime.ThreadContext
dup
astore 1
start local 1 5: ifnonnull 7
6: aload 0
getfield org.jruby.internal.runtime.ThreadService.localContext:Ljava/lang/ThreadLocal;
aconst_null
invokevirtual java.lang.ThreadLocal.set:(Ljava/lang/Object;)V
end local 2 7: StackMap locals: org.jruby.internal.runtime.ThreadService org.jruby.runtime.ThreadContext
StackMap stack:
aload 1
ifnull 0
8: aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lorg/jruby/internal/runtime/ThreadService;
3 4 1 context Lorg/jruby/runtime/ThreadContext;
5 9 1 context Lorg/jruby/runtime/ThreadContext;
1 7 2 ref Ljava/lang/ref/SoftReference<Lorg/jruby/runtime/ThreadContext;>;
private org.jruby.RubyThread adoptCurrentThread();
descriptor: ()Lorg/jruby/RubyThread;
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jruby.internal.runtime.ThreadService.runtime:Lorg/jruby/Ruby;
aload 0
invokestatic java.lang.Thread.currentThread:()Ljava/lang/Thread;
invokestatic org.jruby.RubyThread.adopt:(Lorg/jruby/Ruby;Lorg/jruby/internal/runtime/ThreadService;Ljava/lang/Thread;)Lorg/jruby/RubyThread;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/internal/runtime/ThreadService;
public org.jruby.runtime.ThreadContext registerNewThread(org.jruby.RubyThread);
descriptor: (Lorg/jruby/RubyThread;)Lorg/jruby/runtime/ThreadContext;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=2
start local 0 start local 1 0: getstatic org.jruby.internal.runtime.ThreadService.$assertionsDisabled:Z
ifne 1
aload 1
invokevirtual org.jruby.RubyThread.getContext:()Lorg/jruby/runtime/ThreadContext;
ifnull 1
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
1: StackMap locals:
StackMap stack:
aload 0
getfield org.jruby.internal.runtime.ThreadService.runtime:Lorg/jruby/Ruby;
invokestatic org.jruby.runtime.ThreadContext.newContext:(Lorg/jruby/Ruby;)Lorg/jruby/runtime/ThreadContext;
astore 2
start local 2 2: aload 2
aload 1
invokevirtual org.jruby.runtime.ThreadContext.setThread:(Lorg/jruby/RubyThread;)V
3: aload 2
aload 1
invokestatic org.jruby.ext.fiber.ThreadFiber.initRootFiber:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/RubyThread;)V
4: aload 0
getfield org.jruby.internal.runtime.ThreadService.localContext:Ljava/lang/ThreadLocal;
new java.lang.ref.SoftReference
dup
aload 2
invokespecial java.lang.ref.SoftReference.<init>:(Ljava/lang/Object;)V
invokevirtual java.lang.ThreadLocal.set:(Ljava/lang/Object;)V
5: aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/jruby/internal/runtime/ThreadService;
0 6 1 thread Lorg/jruby/RubyThread;
2 6 2 context Lorg/jruby/runtime/ThreadContext;
MethodParameters:
Name Flags
thread
public org.jruby.RubyThread getMainThread();
descriptor: ()Lorg/jruby/RubyThread;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jruby.internal.runtime.ThreadService.mainContext:Lorg/jruby/runtime/ThreadContext;
invokevirtual org.jruby.runtime.ThreadContext.getThread:()Lorg/jruby/RubyThread;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/internal/runtime/ThreadService;
public void setMainThread(java.lang.Thread, org.jruby.RubyThread);
descriptor: (Ljava/lang/Thread;Lorg/jruby/RubyThread;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield org.jruby.internal.runtime.ThreadService.mainContext:Lorg/jruby/runtime/ThreadContext;
aload 2
invokevirtual org.jruby.runtime.ThreadContext.setThread:(Lorg/jruby/RubyThread;)V
1: aload 0
getfield org.jruby.internal.runtime.ThreadService.rubyThreadMap:Ljava/util/Map;
aload 1
aload 2
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
2: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/jruby/internal/runtime/ThreadService;
0 3 1 thread Ljava/lang/Thread;
0 3 2 rubyThread Lorg/jruby/RubyThread;
MethodParameters:
Name Flags
thread
rubyThread
public org.jruby.RubyThread[] getActiveRubyThreads();
descriptor: ()[Lorg/jruby/RubyThread;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=7, args_size=1
start local 0 0: aload 0
getfield org.jruby.internal.runtime.ThreadService.rubyThreadMap:Ljava/util/Map;
dup
astore 2
monitorenter
1: new java.util.ArrayList
dup
aload 0
getfield org.jruby.internal.runtime.ThreadService.rubyThreadMap:Ljava/util/Map;
invokeinterface java.util.Map.size:()I
invokespecial java.util.ArrayList.<init>:(I)V
astore 1
start local 1 2: aload 0
getfield org.jruby.internal.runtime.ThreadService.rubyThreadMap:Ljava/util/Map;
invokeinterface java.util.Map.entrySet:()Ljava/util/Set;
invokeinterface java.util.Set.iterator:()Ljava/util/Iterator;
astore 4
goto 13
StackMap locals: org.jruby.internal.runtime.ThreadService java.util.ArrayList java.util.Map top java.util.Iterator
StackMap stack:
3: aload 4
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.util.Map$Entry
astore 3
start local 3 4: aload 3
invokeinterface java.util.Map$Entry.getKey:()Ljava/lang/Object;
astore 5
start local 5 5: aload 5
ifnonnull 6
goto 13
6: StackMap locals: org.jruby.internal.runtime.ThreadService java.util.ArrayList java.util.Map java.util.Map$Entry java.util.Iterator java.lang.Object
StackMap stack:
aload 5
instanceof java.lang.Thread
ifeq 9
7: aload 5
checkcast java.lang.Thread
astore 6
start local 6 8: aload 6
invokevirtual java.lang.Thread.isAlive:()Z
ifne 12
goto 13
end local 6 9: StackMap locals:
StackMap stack:
aload 5
instanceof java.util.concurrent.Future
ifeq 12
10: aload 5
checkcast java.util.concurrent.Future
astore 6
start local 6 11: aload 6
invokeinterface java.util.concurrent.Future.isDone:()Z
ifne 13
aload 6
invokeinterface java.util.concurrent.Future.isCancelled:()Z
ifeq 12
goto 13
end local 6 12: StackMap locals:
StackMap stack:
aload 1
aload 3
invokeinterface java.util.Map$Entry.getValue:()Ljava/lang/Object;
checkcast org.jruby.RubyThread
invokevirtual java.util.ArrayList.add:(Ljava/lang/Object;)Z
pop
end local 5 end local 3 13: StackMap locals: org.jruby.internal.runtime.ThreadService java.util.ArrayList java.util.Map top java.util.Iterator
StackMap stack:
aload 4
invokeinterface java.util.Iterator.hasNext:()Z
ifne 3
14: aload 2
monitorexit
15: goto 18
end local 1 StackMap locals: org.jruby.internal.runtime.ThreadService top java.util.Map
StackMap stack: java.lang.Throwable
16: aload 2
monitorexit
17: athrow
start local 1 18: StackMap locals: org.jruby.internal.runtime.ThreadService java.util.ArrayList
StackMap stack:
aload 1
aload 1
invokevirtual java.util.ArrayList.size:()I
anewarray org.jruby.RubyThread
invokevirtual java.util.ArrayList.toArray:([Ljava/lang/Object;)[Ljava/lang/Object;
checkcast org.jruby.RubyThread[]
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 19 0 this Lorg/jruby/internal/runtime/ThreadService;
2 16 1 rtList Ljava/util/ArrayList<Lorg/jruby/RubyThread;>;
18 19 1 rtList Ljava/util/ArrayList<Lorg/jruby/RubyThread;>;
4 13 3 entry Ljava/util/Map$Entry<Ljava/lang/Object;Lorg/jruby/RubyThread;>;
5 13 5 key Ljava/lang/Object;
8 9 6 t Ljava/lang/Thread;
11 12 6 f Ljava/util/concurrent/Future;
Exception table:
from to target type
1 15 16 any
16 17 16 any
public void associateThread(java.lang.Thread, org.jruby.RubyThread);
descriptor: (Ljava/lang/Thread;Lorg/jruby/RubyThread;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield org.jruby.internal.runtime.ThreadService.rubyThreadMap:Ljava/util/Map;
aload 1
aload 2
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
1: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/jruby/internal/runtime/ThreadService;
0 2 1 thread Ljava/lang/Thread;
0 2 2 rubyThread Lorg/jruby/RubyThread;
MethodParameters:
Name Flags
thread
rubyThread
public void unregisterThread(org.jruby.RubyThread);
descriptor: (Lorg/jruby/RubyThread;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokevirtual org.jruby.RubyThread.getContext:()Lorg/jruby/runtime/ThreadContext;
aload 1
invokevirtual org.jruby.RubyThread.getNativeThread:()Ljava/lang/Thread;
invokevirtual org.jruby.internal.runtime.ThreadService.unregisterThreadImpl:(Lorg/jruby/runtime/ThreadContext;Ljava/lang/Thread;)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/jruby/internal/runtime/ThreadService;
0 2 1 thread Lorg/jruby/RubyThread;
MethodParameters:
Name Flags
thread
public void unregisterCurrentThread(org.jruby.runtime.ThreadContext);
descriptor: (Lorg/jruby/runtime/ThreadContext;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokestatic java.lang.Thread.currentThread:()Ljava/lang/Thread;
invokevirtual org.jruby.internal.runtime.ThreadService.unregisterThreadImpl:(Lorg/jruby/runtime/ThreadContext;Ljava/lang/Thread;)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/jruby/internal/runtime/ThreadService;
0 2 1 context Lorg/jruby/runtime/ThreadContext;
MethodParameters:
Name Flags
context
private void unregisterThreadImpl(org.jruby.runtime.ThreadContext, java.lang.Thread);
descriptor: (Lorg/jruby/runtime/ThreadContext;Ljava/lang/Thread;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield org.jruby.internal.runtime.ThreadService.rubyThreadMap:Ljava/util/Map;
aload 2
invokeinterface java.util.Map.remove:(Ljava/lang/Object;)Ljava/lang/Object;
pop
1: aload 1
ifnull 5
2: aload 1
invokevirtual org.jruby.runtime.ThreadContext.getThread:()Lorg/jruby/RubyThread;
astore 3
start local 3 3: aload 1
aconst_null
invokevirtual org.jruby.runtime.ThreadContext.setThread:(Lorg/jruby/RubyThread;)V
4: aload 3
ifnull 5
aload 3
invokevirtual org.jruby.RubyThread.clearContext:()V
end local 3 5: StackMap locals:
StackMap stack:
aload 0
getfield org.jruby.internal.runtime.ThreadService.localContext:Ljava/lang/ThreadLocal;
invokevirtual java.lang.ThreadLocal.get:()Ljava/lang/Object;
checkcast java.lang.ref.SoftReference
astore 3
start local 3 6: aload 3
ifnull 7
aload 3
invokevirtual java.lang.ref.SoftReference.clear:()V
7: StackMap locals: java.lang.ref.SoftReference
StackMap stack:
aload 0
getfield org.jruby.internal.runtime.ThreadService.localContext:Ljava/lang/ThreadLocal;
invokevirtual java.lang.ThreadLocal.remove:()V
8: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lorg/jruby/internal/runtime/ThreadService;
0 9 1 context Lorg/jruby/runtime/ThreadContext;
0 9 2 nativeThread Ljava/lang/Thread;
3 5 3 thread Lorg/jruby/RubyThread;
6 9 3 ref Ljava/lang/ref/SoftReference<Lorg/jruby/runtime/ThreadContext;>;
MethodParameters:
Name Flags
context
nativeThread
public void disposeCurrentThread();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
aload 0
invokevirtual org.jruby.internal.runtime.ThreadService.getCurrentContext:()Lorg/jruby/runtime/ThreadContext;
invokevirtual org.jruby.internal.runtime.ThreadService.unregisterCurrentThread:(Lorg/jruby/runtime/ThreadContext;)V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/jruby/internal/runtime/ThreadService;
RuntimeVisibleAnnotations:
java.lang.Deprecated()
public long incrementAndGetThreadCount();
descriptor: ()J
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jruby.internal.runtime.ThreadService.threadCount:Ljava/util/concurrent/atomic/AtomicLong;
invokevirtual java.util.concurrent.atomic.AtomicLong.incrementAndGet:()J
lreturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/internal/runtime/ThreadService;
public java.util.Map<java.lang.Object, org.jruby.RubyThread> getRubyThreadMap();
descriptor: ()Ljava/util/Map;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jruby.internal.runtime.ThreadService.rubyThreadMap:Ljava/util/Map;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/internal/runtime/ThreadService;
Signature: ()Ljava/util/Map<Ljava/lang/Object;Lorg/jruby/RubyThread;>;
RuntimeVisibleAnnotations:
java.lang.Deprecated()
public void deliverEvent(org.jruby.RubyThread, org.jruby.RubyThread, org.jruby.internal.runtime.ThreadService$Event);
descriptor: (Lorg/jruby/RubyThread;Lorg/jruby/RubyThread;Lorg/jruby/internal/runtime/ThreadService$Event;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=0, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/internal/runtime/ThreadService;
0 1 1 sender Lorg/jruby/RubyThread;
0 1 2 target Lorg/jruby/RubyThread;
0 1 3 event Lorg/jruby/internal/runtime/ThreadService$Event;
RuntimeVisibleAnnotations:
java.lang.Deprecated()
MethodParameters:
Name Flags
sender
target
event
public java.lang.ThreadGroup getRubyThreadGroup();
descriptor: ()Ljava/lang/ThreadGroup;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jruby.internal.runtime.ThreadService.rubyThreadGroup:Ljava/lang/ThreadGroup;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/internal/runtime/ThreadService;
RuntimeVisibleAnnotations:
java.lang.Deprecated()
public org.jruby.runtime.ThreadContext getThreadContextForThread(org.jruby.RubyThread);
descriptor: (Lorg/jruby/RubyThread;)Lorg/jruby/runtime/ThreadContext;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=2, args_size=2
start local 0 start local 1 0: aload 1
invokevirtual org.jruby.RubyThread.getContext:()Lorg/jruby/runtime/ThreadContext;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/internal/runtime/ThreadService;
0 1 1 thread Lorg/jruby/RubyThread;
RuntimeVisibleAnnotations:
java.lang.Deprecated()
MethodParameters:
Name Flags
thread
public synchronized void dissociateThread(java.lang.Object);
descriptor: (Ljava/lang/Object;)V
flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield org.jruby.internal.runtime.ThreadService.rubyThreadMap:Ljava/util/Map;
aload 1
invokeinterface java.util.Map.remove:(Ljava/lang/Object;)Ljava/lang/Object;
pop
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/jruby/internal/runtime/ThreadService;
0 2 1 threadOrFuture Ljava/lang/Object;
RuntimeVisibleAnnotations:
java.lang.Deprecated()
MethodParameters:
Name Flags
threadOrFuture
public final void setCurrentContext(org.jruby.runtime.ThreadContext);
descriptor: (Lorg/jruby/runtime/ThreadContext;)V
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield org.jruby.internal.runtime.ThreadService.localContext:Ljava/lang/ThreadLocal;
new java.lang.ref.SoftReference
dup
aload 1
invokespecial java.lang.ref.SoftReference.<init>:(Ljava/lang/Object;)V
invokevirtual java.lang.ThreadLocal.set:(Ljava/lang/Object;)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/jruby/internal/runtime/ThreadService;
0 2 1 context Lorg/jruby/runtime/ThreadContext;
RuntimeVisibleAnnotations:
java.lang.Deprecated()
MethodParameters:
Name Flags
context
public boolean getPolling();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jruby.internal.runtime.ThreadService.rubyThreadMap:Ljava/util/Map;
invokeinterface java.util.Map.size:()I
iconst_1
if_icmple 1
iconst_1
ireturn
StackMap locals:
StackMap stack:
1: iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/jruby/internal/runtime/ThreadService;
RuntimeVisibleAnnotations:
java.lang.Deprecated()
public void setCritical(boolean);
descriptor: (Z)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=2, args_size=2
start local 0 start local 1 0: iload 1
ifeq 3
aload 0
getfield org.jruby.internal.runtime.ThreadService.criticalLock:Ljava/util/concurrent/locks/ReentrantLock;
invokevirtual java.util.concurrent.locks.ReentrantLock.isHeldByCurrentThread:()Z
ifne 3
1: aload 0
invokevirtual org.jruby.internal.runtime.ThreadService.acquireCritical:()V
2: goto 5
StackMap locals:
StackMap stack:
3: iload 1
ifne 5
aload 0
getfield org.jruby.internal.runtime.ThreadService.criticalLock:Ljava/util/concurrent/locks/ReentrantLock;
invokevirtual java.util.concurrent.locks.ReentrantLock.isHeldByCurrentThread:()Z
ifeq 5
4: aload 0
invokevirtual org.jruby.internal.runtime.ThreadService.releaseCritical:()V
5: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/jruby/internal/runtime/ThreadService;
0 6 1 critical Z
RuntimeVisibleAnnotations:
java.lang.Deprecated()
MethodParameters:
Name Flags
critical
private void acquireCritical();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jruby.internal.runtime.ThreadService.criticalLock:Ljava/util/concurrent/locks/ReentrantLock;
invokevirtual java.util.concurrent.locks.ReentrantLock.lock:()V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/jruby/internal/runtime/ThreadService;
RuntimeVisibleAnnotations:
java.lang.Deprecated()
private void releaseCritical();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jruby.internal.runtime.ThreadService.criticalLock:Ljava/util/concurrent/locks/ReentrantLock;
invokevirtual java.util.concurrent.locks.ReentrantLock.unlock:()V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/jruby/internal/runtime/ThreadService;
RuntimeVisibleAnnotations:
java.lang.Deprecated()
public boolean getCritical();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jruby.internal.runtime.ThreadService.criticalLock:Ljava/util/concurrent/locks/ReentrantLock;
invokevirtual java.util.concurrent.locks.ReentrantLock.isHeldByCurrentThread:()Z
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/internal/runtime/ThreadService;
RuntimeVisibleAnnotations:
java.lang.Deprecated()
}
SourceFile: "ThreadService.java"
NestMembers:
org.jruby.internal.runtime.ThreadService$Event org.jruby.internal.runtime.ThreadService$Event$Type
InnerClasses:
public abstract Entry = java.util.Map$Entry of java.util.Map
public Event = org.jruby.internal.runtime.ThreadService$Event of org.jruby.internal.runtime.ThreadService