public class org.jruby.ext.thread.Queue extends org.jruby.RubyObject implements org.jruby.runtime.marshal.DataType
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.jruby.ext.thread.Queue
super_class: org.jruby.RubyObject
{
protected volatile boolean closed;
descriptor: Z
flags: (0x0044) ACC_PROTECTED, ACC_VOLATILE
protected volatile int capacity;
descriptor: I
flags: (0x0044) ACC_PROTECTED, ACC_VOLATILE
protected final java.util.concurrent.atomic.AtomicInteger count;
descriptor: Ljava/util/concurrent/atomic/AtomicInteger;
flags: (0x0014) ACC_PROTECTED, ACC_FINAL
transient org.jruby.ext.thread.Queue$Node head;
descriptor: Lorg/jruby/ext/thread/Queue$Node;
flags: (0x0080) ACC_TRANSIENT
protected transient org.jruby.ext.thread.Queue$Node last;
descriptor: Lorg/jruby/ext/thread/Queue$Node;
flags: (0x0084) ACC_PROTECTED, ACC_TRANSIENT
protected final java.util.concurrent.locks.ReentrantLock takeLock;
descriptor: Ljava/util/concurrent/locks/ReentrantLock;
flags: (0x0014) ACC_PROTECTED, ACC_FINAL
protected final java.util.concurrent.locks.Condition notEmpty;
descriptor: Ljava/util/concurrent/locks/Condition;
flags: (0x0014) ACC_PROTECTED, ACC_FINAL
protected final java.util.concurrent.locks.ReentrantLock putLock;
descriptor: Ljava/util/concurrent/locks/ReentrantLock;
flags: (0x0014) ACC_PROTECTED, ACC_FINAL
protected final java.util.concurrent.locks.Condition notFull;
descriptor: Ljava/util/concurrent/locks/Condition;
flags: (0x0014) ACC_PROTECTED, ACC_FINAL
private static final org.jruby.RubyThread$Task<org.jruby.ext.thread.Queue, org.jruby.runtime.builtin.IRubyObject> BLOCKING_POP_TASK;
descriptor: Lorg/jruby/RubyThread$Task;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
Signature: Lorg/jruby/RubyThread$Task<Lorg/jruby/ext/thread/Queue;Lorg/jruby/runtime/builtin/IRubyObject;>;
private static final org.jruby.RubyThread$Task<org.jruby.ext.thread.Queue, org.jruby.runtime.builtin.IRubyObject> NONBLOCKING_POP_TASK;
descriptor: Lorg/jruby/RubyThread$Task;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
Signature: Lorg/jruby/RubyThread$Task<Lorg/jruby/ext/thread/Queue;Lorg/jruby/runtime/builtin/IRubyObject;>;
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: new org.jruby.ext.thread.Queue$1
dup
invokespecial org.jruby.ext.thread.Queue$1.<init>:()V
putstatic org.jruby.ext.thread.Queue.BLOCKING_POP_TASK:Lorg/jruby/RubyThread$Task;
1: new org.jruby.ext.thread.Queue$2
dup
invokespecial org.jruby.ext.thread.Queue$2.<init>:()V
putstatic org.jruby.ext.thread.Queue.NONBLOCKING_POP_TASK:Lorg/jruby/RubyThread$Task;
2: return
LocalVariableTable:
Start End Slot Name Signature
protected void signalNotEmpty();
descriptor: ()V
flags: (0x0004) ACC_PROTECTED
Code:
stack=1, locals=3, args_size=1
start local 0 0: aload 0
getfield org.jruby.ext.thread.Queue.takeLock:Ljava/util/concurrent/locks/ReentrantLock;
astore 1
start local 1 1: aload 1
invokevirtual java.util.concurrent.locks.ReentrantLock.lock:()V
2: aload 0
getfield org.jruby.ext.thread.Queue.notEmpty:Ljava/util/concurrent/locks/Condition;
invokeinterface java.util.concurrent.locks.Condition.signal:()V
3: goto 7
StackMap locals: org.jruby.ext.thread.Queue java.util.concurrent.locks.ReentrantLock
StackMap stack: java.lang.Throwable
4: astore 2
5: aload 1
invokevirtual java.util.concurrent.locks.ReentrantLock.unlock:()V
6: aload 2
athrow
7: StackMap locals:
StackMap stack:
aload 1
invokevirtual java.util.concurrent.locks.ReentrantLock.unlock:()V
8: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lorg/jruby/ext/thread/Queue;
1 9 1 takeLock Ljava/util/concurrent/locks/ReentrantLock;
Exception table:
from to target type
2 4 4 any
protected void signalNotFull();
descriptor: ()V
flags: (0x0004) ACC_PROTECTED
Code:
stack=1, locals=3, args_size=1
start local 0 0: aload 0
getfield org.jruby.ext.thread.Queue.putLock:Ljava/util/concurrent/locks/ReentrantLock;
astore 1
start local 1 1: aload 1
invokevirtual java.util.concurrent.locks.ReentrantLock.lock:()V
2: aload 0
getfield org.jruby.ext.thread.Queue.notFull:Ljava/util/concurrent/locks/Condition;
invokeinterface java.util.concurrent.locks.Condition.signal:()V
3: goto 7
StackMap locals: org.jruby.ext.thread.Queue java.util.concurrent.locks.ReentrantLock
StackMap stack: java.lang.Throwable
4: astore 2
5: aload 1
invokevirtual java.util.concurrent.locks.ReentrantLock.unlock:()V
6: aload 2
athrow
7: StackMap locals:
StackMap stack:
aload 1
invokevirtual java.util.concurrent.locks.ReentrantLock.unlock:()V
8: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lorg/jruby/ext/thread/Queue;
1 9 1 putLock Ljava/util/concurrent/locks/ReentrantLock;
Exception table:
from to target type
2 4 4 any
protected void enqueue(org.jruby.ext.thread.Queue$Node);
descriptor: (Lorg/jruby/ext/thread/Queue$Node;)V
flags: (0x0004) ACC_PROTECTED
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 0
getfield org.jruby.ext.thread.Queue.last:Lorg/jruby/ext/thread/Queue$Node;
aload 1
dup_x1
putfield org.jruby.ext.thread.Queue$Node.next:Lorg/jruby/ext/thread/Queue$Node;
putfield org.jruby.ext.thread.Queue.last:Lorg/jruby/ext/thread/Queue$Node;
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/jruby/ext/thread/Queue;
0 2 1 node Lorg/jruby/ext/thread/Queue$Node;
MethodParameters:
Name Flags
node
protected org.jruby.runtime.builtin.IRubyObject dequeue();
descriptor: ()Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0004) ACC_PROTECTED
Code:
stack=2, locals=4, args_size=1
start local 0 0: aload 0
getfield org.jruby.ext.thread.Queue.head:Lorg/jruby/ext/thread/Queue$Node;
astore 1
start local 1 1: aload 1
getfield org.jruby.ext.thread.Queue$Node.next:Lorg/jruby/ext/thread/Queue$Node;
astore 2
start local 2 2: aload 1
aload 1
putfield org.jruby.ext.thread.Queue$Node.next:Lorg/jruby/ext/thread/Queue$Node;
3: aload 0
aload 2
putfield org.jruby.ext.thread.Queue.head:Lorg/jruby/ext/thread/Queue$Node;
4: aload 2
getfield org.jruby.ext.thread.Queue$Node.item:Lorg/jruby/runtime/builtin/IRubyObject;
astore 3
start local 3 5: aload 2
aconst_null
putfield org.jruby.ext.thread.Queue$Node.item:Lorg/jruby/runtime/builtin/IRubyObject;
6: aload 3
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/jruby/ext/thread/Queue;
1 7 1 h Lorg/jruby/ext/thread/Queue$Node;
2 7 2 first Lorg/jruby/ext/thread/Queue$Node;
5 7 3 x Lorg/jruby/runtime/builtin/IRubyObject;
protected void fullyLock();
descriptor: ()V
flags: (0x0004) ACC_PROTECTED
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jruby.ext.thread.Queue.putLock:Ljava/util/concurrent/locks/ReentrantLock;
invokevirtual java.util.concurrent.locks.ReentrantLock.lock:()V
1: aload 0
getfield org.jruby.ext.thread.Queue.takeLock:Ljava/util/concurrent/locks/ReentrantLock;
invokevirtual java.util.concurrent.locks.ReentrantLock.lock:()V
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/jruby/ext/thread/Queue;
protected void fullyUnlock();
descriptor: ()V
flags: (0x0004) ACC_PROTECTED
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jruby.ext.thread.Queue.takeLock:Ljava/util/concurrent/locks/ReentrantLock;
invokevirtual java.util.concurrent.locks.ReentrantLock.unlock:()V
1: aload 0
getfield org.jruby.ext.thread.Queue.putLock:Ljava/util/concurrent/locks/ReentrantLock;
invokevirtual java.util.concurrent.locks.ReentrantLock.unlock:()V
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/jruby/ext/thread/Queue;
protected void initializedCheck();
descriptor: ()V
flags: (0x0004) ACC_PROTECTED
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jruby.ext.thread.Queue.capacity:I
ifne 1
aload 0
invokevirtual org.jruby.ext.thread.Queue.getRuntime:()Lorg/jruby/Ruby;
new java.lang.StringBuilder
dup
invokespecial java.lang.StringBuilder.<init>:()V
aload 0
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc " not initialized"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual org.jruby.Ruby.newTypeError:(Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
1: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/jruby/ext/thread/Queue;
public void <init>(org.jruby.Ruby, org.jruby.RubyClass);
descriptor: (Lorg/jruby/Ruby;Lorg/jruby/RubyClass;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
aload 2
invokespecial org.jruby.RubyObject.<init>:(Lorg/jruby/Ruby;Lorg/jruby/RubyClass;)V
1: aload 0
iconst_0
putfield org.jruby.ext.thread.Queue.closed:Z
2: aload 0
new java.util.concurrent.atomic.AtomicInteger
dup
invokespecial java.util.concurrent.atomic.AtomicInteger.<init>:()V
putfield org.jruby.ext.thread.Queue.count:Ljava/util/concurrent/atomic/AtomicInteger;
3: aload 0
new java.util.concurrent.locks.ReentrantLock
dup
invokespecial java.util.concurrent.locks.ReentrantLock.<init>:()V
putfield org.jruby.ext.thread.Queue.takeLock:Ljava/util/concurrent/locks/ReentrantLock;
4: aload 0
aload 0
getfield org.jruby.ext.thread.Queue.takeLock:Ljava/util/concurrent/locks/ReentrantLock;
invokevirtual java.util.concurrent.locks.ReentrantLock.newCondition:()Ljava/util/concurrent/locks/Condition;
putfield org.jruby.ext.thread.Queue.notEmpty:Ljava/util/concurrent/locks/Condition;
5: aload 0
new java.util.concurrent.locks.ReentrantLock
dup
invokespecial java.util.concurrent.locks.ReentrantLock.<init>:()V
putfield org.jruby.ext.thread.Queue.putLock:Ljava/util/concurrent/locks/ReentrantLock;
6: aload 0
aload 0
getfield org.jruby.ext.thread.Queue.putLock:Ljava/util/concurrent/locks/ReentrantLock;
invokevirtual java.util.concurrent.locks.ReentrantLock.newCondition:()Ljava/util/concurrent/locks/Condition;
putfield org.jruby.ext.thread.Queue.notFull:Ljava/util/concurrent/locks/Condition;
7: aload 0
aload 0
new org.jruby.ext.thread.Queue$Node
dup
aconst_null
invokespecial org.jruby.ext.thread.Queue$Node.<init>:(Lorg/jruby/runtime/builtin/IRubyObject;)V
dup_x1
putfield org.jruby.ext.thread.Queue.head:Lorg/jruby/ext/thread/Queue$Node;
putfield org.jruby.ext.thread.Queue.last:Lorg/jruby/ext/thread/Queue$Node;
8: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lorg/jruby/ext/thread/Queue;
0 9 1 runtime Lorg/jruby/Ruby;
0 9 2 type Lorg/jruby/RubyClass;
MethodParameters:
Name Flags
runtime
type
public static void setup(org.jruby.Ruby);
descriptor: (Lorg/jruby/Ruby;)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=3, args_size=1
start local 0 0: aload 0
invokevirtual org.jruby.Ruby.getThread:()Lorg/jruby/RubyClass;
ldc "Queue"
aload 0
invokevirtual org.jruby.Ruby.getObject:()Lorg/jruby/RubyClass;
new org.jruby.ext.thread.Queue$3
dup
invokespecial org.jruby.ext.thread.Queue$3.<init>:()V
invokevirtual org.jruby.RubyClass.defineClassUnder:(Ljava/lang/String;Lorg/jruby/RubyClass;Lorg/jruby/runtime/ObjectAllocator;)Lorg/jruby/RubyClass;
astore 1
start local 1 1: aload 1
ldc "initialize_copy"
invokevirtual org.jruby.RubyClass.undefineMethod:(Ljava/lang/String;)V
2: aload 1
ldc Lorg/jruby/ext/thread/Queue;
invokevirtual org.jruby.RubyClass.setReifiedClass:(Ljava/lang/Class;)V
3: aload 1
ldc Lorg/jruby/ext/thread/Queue;
invokevirtual org.jruby.RubyClass.defineAnnotatedMethods:(Ljava/lang/Class;)V
4: aload 0
invokevirtual org.jruby.Ruby.getObject:()Lorg/jruby/RubyClass;
ldc "Queue"
aload 1
invokevirtual org.jruby.RubyClass.setConstant:(Ljava/lang/String;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
pop
5: aload 1
ldc "ClosedQueueError"
aload 0
invokevirtual org.jruby.Ruby.getStopIteration:()Lorg/jruby/RubyClass;
aload 0
invokevirtual org.jruby.Ruby.getStopIteration:()Lorg/jruby/RubyClass;
invokevirtual org.jruby.RubyClass.getAllocator:()Lorg/jruby/runtime/ObjectAllocator;
invokevirtual org.jruby.RubyClass.defineClassUnder:(Ljava/lang/String;Lorg/jruby/RubyClass;Lorg/jruby/runtime/ObjectAllocator;)Lorg/jruby/RubyClass;
astore 2
start local 2 6: aload 0
invokevirtual org.jruby.Ruby.getObject:()Lorg/jruby/RubyClass;
ldc "ClosedQueueError"
aload 2
invokevirtual org.jruby.RubyClass.setConstant:(Ljava/lang/String;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
pop
7: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 runtime Lorg/jruby/Ruby;
1 8 1 cQueue Lorg/jruby/RubyClass;
6 8 2 cClosedQueueError Lorg/jruby/RubyClass;
MethodParameters:
Name Flags
runtime
public org.jruby.runtime.builtin.IRubyObject initialize(org.jruby.runtime.ThreadContext);
descriptor: (Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
ldc 2147483647
putfield org.jruby.ext.thread.Queue.capacity:I
1: aload 0
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/jruby/ext/thread/Queue;
0 2 1 context Lorg/jruby/runtime/ThreadContext;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(visibility = org.jruby.runtime.Visibility.PRIVATE:Lorg/jruby/runtime/Visibility;)
MethodParameters:
Name Flags
context
public org.jruby.runtime.builtin.IRubyObject clear(org.jruby.runtime.ThreadContext);
descriptor: (Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual org.jruby.ext.thread.Queue.initializedCheck:()V
1: aload 0
invokevirtual org.jruby.ext.thread.Queue.clearInternal:()V
2: goto 5
StackMap locals:
StackMap stack: java.lang.InterruptedException
3: pop
4: aload 0
aload 1
ldc "clear"
invokevirtual org.jruby.ext.thread.Queue.createInterruptedError:(Lorg/jruby/runtime/ThreadContext;Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
5: StackMap locals:
StackMap stack:
aload 0
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/jruby/ext/thread/Queue;
0 6 1 context Lorg/jruby/runtime/ThreadContext;
Exception table:
from to target type
1 2 3 Class java.lang.InterruptedException
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod()
MethodParameters:
Name Flags
context
protected void clearInternal();
descriptor: ()V
flags: (0x0004) ACC_PROTECTED
Code:
stack=2, locals=7, args_size=1
start local 0 0: aload 0
getfield org.jruby.ext.thread.Queue.putLock:Ljava/util/concurrent/locks/ReentrantLock;
astore 1
start local 1 1: aload 0
getfield org.jruby.ext.thread.Queue.takeLock:Ljava/util/concurrent/locks/ReentrantLock;
astore 2
start local 2 2: aload 1
invokevirtual java.util.concurrent.locks.ReentrantLock.lockInterruptibly:()V
3: aload 2
invokevirtual java.util.concurrent.locks.ReentrantLock.lockInterruptibly:()V
4: aload 0
getfield org.jruby.ext.thread.Queue.head:Lorg/jruby/ext/thread/Queue$Node;
astore 4
start local 4 5: goto 9
start local 3 6: StackMap locals: org.jruby.ext.thread.Queue java.util.concurrent.locks.ReentrantLock java.util.concurrent.locks.ReentrantLock org.jruby.ext.thread.Queue$Node org.jruby.ext.thread.Queue$Node
StackMap stack:
aload 4
aload 4
putfield org.jruby.ext.thread.Queue$Node.next:Lorg/jruby/ext/thread/Queue$Node;
7: aload 3
aconst_null
putfield org.jruby.ext.thread.Queue$Node.item:Lorg/jruby/runtime/builtin/IRubyObject;
8: aload 3
astore 4
end local 3 StackMap locals: org.jruby.ext.thread.Queue java.util.concurrent.locks.ReentrantLock java.util.concurrent.locks.ReentrantLock top org.jruby.ext.thread.Queue$Node
StackMap stack:
9: aload 4
getfield org.jruby.ext.thread.Queue$Node.next:Lorg/jruby/ext/thread/Queue$Node;
dup
astore 3
start local 3 10: ifnonnull 6
end local 4 end local 3 11: aload 0
aload 0
getfield org.jruby.ext.thread.Queue.last:Lorg/jruby/ext/thread/Queue$Node;
putfield org.jruby.ext.thread.Queue.head:Lorg/jruby/ext/thread/Queue$Node;
12: aload 0
getfield org.jruby.ext.thread.Queue.count:Ljava/util/concurrent/atomic/AtomicInteger;
iconst_0
invokevirtual java.util.concurrent.atomic.AtomicInteger.getAndSet:(I)I
aload 0
getfield org.jruby.ext.thread.Queue.capacity:I
if_icmpne 18
13: aload 0
getfield org.jruby.ext.thread.Queue.notFull:Ljava/util/concurrent/locks/Condition;
invokeinterface java.util.concurrent.locks.Condition.signal:()V
14: goto 18
StackMap locals: org.jruby.ext.thread.Queue java.util.concurrent.locks.ReentrantLock java.util.concurrent.locks.ReentrantLock
StackMap stack: java.lang.Throwable
15: astore 5
16: aload 2
invokevirtual java.util.concurrent.locks.ReentrantLock.unlock:()V
17: aload 5
athrow
18: StackMap locals:
StackMap stack:
aload 2
invokevirtual java.util.concurrent.locks.ReentrantLock.unlock:()V
19: goto 23
StackMap locals:
StackMap stack: java.lang.Throwable
20: astore 6
21: aload 1
invokevirtual java.util.concurrent.locks.ReentrantLock.unlock:()V
22: aload 6
athrow
23: StackMap locals:
StackMap stack:
aload 1
invokevirtual java.util.concurrent.locks.ReentrantLock.unlock:()V
24: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 25 0 this Lorg/jruby/ext/thread/Queue;
1 25 1 putLock Ljava/util/concurrent/locks/ReentrantLock;
2 25 2 takeLock Ljava/util/concurrent/locks/ReentrantLock;
6 9 3 p Lorg/jruby/ext/thread/Queue$Node;
10 11 3 p Lorg/jruby/ext/thread/Queue$Node;
5 11 4 h Lorg/jruby/ext/thread/Queue$Node;
Exception table:
from to target type
4 15 15 any
3 20 20 any
Exceptions:
throws java.lang.InterruptedException
public org.jruby.RubyBoolean empty_p(org.jruby.runtime.ThreadContext);
descriptor: (Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/RubyBoolean;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual org.jruby.ext.thread.Queue.initializedCheck:()V
1: aload 1
aload 0
getfield org.jruby.ext.thread.Queue.count:Ljava/util/concurrent/atomic/AtomicInteger;
invokevirtual java.util.concurrent.atomic.AtomicInteger.get:()I
ifne 2
iconst_1
goto 3
StackMap locals:
StackMap stack: org.jruby.runtime.ThreadContext
2: iconst_0
StackMap locals: org.jruby.ext.thread.Queue org.jruby.runtime.ThreadContext
StackMap stack: org.jruby.runtime.ThreadContext int
3: invokestatic org.jruby.RubyBoolean.newBoolean:(Lorg/jruby/runtime/ThreadContext;Z)Lorg/jruby/RubyBoolean;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/jruby/ext/thread/Queue;
0 4 1 context Lorg/jruby/runtime/ThreadContext;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(name = {"empty?"})
MethodParameters:
Name Flags
context
public org.jruby.RubyNumeric length(org.jruby.runtime.ThreadContext);
descriptor: (Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/RubyNumeric;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual org.jruby.ext.thread.Queue.initializedCheck:()V
1: aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
aload 0
getfield org.jruby.ext.thread.Queue.count:Ljava/util/concurrent/atomic/AtomicInteger;
invokevirtual java.util.concurrent.atomic.AtomicInteger.get:()I
i2l
invokestatic org.jruby.RubyNumeric.int2fix:(Lorg/jruby/Ruby;J)Lorg/jruby/RubyNumeric;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/jruby/ext/thread/Queue;
0 2 1 context Lorg/jruby/runtime/ThreadContext;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(name = {"length", "size"})
MethodParameters:
Name Flags
context
public org.jruby.RubyNumeric num_waiting(org.jruby.runtime.ThreadContext);
descriptor: (Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/RubyNumeric;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=5, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual org.jruby.ext.thread.Queue.initializedCheck:()V
1: aload 0
getfield org.jruby.ext.thread.Queue.takeLock:Ljava/util/concurrent/locks/ReentrantLock;
astore 2
start local 2 2: aload 2
invokevirtual java.util.concurrent.locks.ReentrantLock.lockInterruptibly:()V
3: aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
aload 2
aload 0
getfield org.jruby.ext.thread.Queue.notEmpty:Ljava/util/concurrent/locks/Condition;
invokevirtual java.util.concurrent.locks.ReentrantLock.getWaitQueueLength:(Ljava/util/concurrent/locks/Condition;)I
invokevirtual org.jruby.Ruby.newFixnum:(I)Lorg/jruby/RubyFixnum;
astore 4
4: aload 2
invokevirtual java.util.concurrent.locks.ReentrantLock.unlock:()V
5: aload 4
areturn
6: StackMap locals: org.jruby.ext.thread.Queue org.jruby.runtime.ThreadContext java.util.concurrent.locks.ReentrantLock
StackMap stack: java.lang.Throwable
astore 3
7: aload 2
invokevirtual java.util.concurrent.locks.ReentrantLock.unlock:()V
8: aload 3
athrow
9: StackMap locals:
StackMap stack: java.lang.InterruptedException
pop
10: aload 0
aload 1
ldc "num_waiting"
invokevirtual org.jruby.ext.thread.Queue.createInterruptedError:(Lorg/jruby/runtime/ThreadContext;Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lorg/jruby/ext/thread/Queue;
0 11 1 context Lorg/jruby/runtime/ThreadContext;
2 11 2 takeLock Ljava/util/concurrent/locks/ReentrantLock;
Exception table:
from to target type
3 4 6 any
2 5 9 Class java.lang.InterruptedException
6 9 9 Class java.lang.InterruptedException
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod()
MethodParameters:
Name Flags
context
public org.jruby.runtime.builtin.IRubyObject pop(org.jruby.runtime.ThreadContext);
descriptor: (Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual org.jruby.ext.thread.Queue.initializedCheck:()V
1: aload 1
invokevirtual org.jruby.runtime.ThreadContext.getThread:()Lorg/jruby/RubyThread;
aload 1
aload 0
getstatic org.jruby.ext.thread.Queue.BLOCKING_POP_TASK:Lorg/jruby/RubyThread$Task;
invokevirtual org.jruby.RubyThread.executeTask:(Lorg/jruby/runtime/ThreadContext;Ljava/lang/Object;Lorg/jruby/RubyThread$Task;)Ljava/lang/Object;
checkcast org.jruby.runtime.builtin.IRubyObject
2: areturn
3: StackMap locals:
StackMap stack: java.lang.InterruptedException
pop
4: aload 0
aload 1
ldc "pop"
invokevirtual org.jruby.ext.thread.Queue.createInterruptedError:(Lorg/jruby/runtime/ThreadContext;Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/jruby/ext/thread/Queue;
0 5 1 context Lorg/jruby/runtime/ThreadContext;
Exception table:
from to target type
1 2 3 Class java.lang.InterruptedException
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(name = {"pop", "deq", "shift"})
MethodParameters:
Name Flags
context
public org.jruby.runtime.builtin.IRubyObject pop(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokevirtual org.jruby.ext.thread.Queue.initializedCheck:()V
1: aload 1
invokevirtual org.jruby.runtime.ThreadContext.getThread:()Lorg/jruby/RubyThread;
aload 1
aload 0
aload 2
invokeinterface org.jruby.runtime.builtin.IRubyObject.isTrue:()Z
ifne 2
getstatic org.jruby.ext.thread.Queue.BLOCKING_POP_TASK:Lorg/jruby/RubyThread$Task;
goto 3
StackMap locals: org.jruby.ext.thread.Queue org.jruby.runtime.ThreadContext org.jruby.runtime.builtin.IRubyObject
StackMap stack: org.jruby.RubyThread org.jruby.runtime.ThreadContext org.jruby.ext.thread.Queue
2: getstatic org.jruby.ext.thread.Queue.NONBLOCKING_POP_TASK:Lorg/jruby/RubyThread$Task;
StackMap locals: org.jruby.ext.thread.Queue org.jruby.runtime.ThreadContext org.jruby.runtime.builtin.IRubyObject
StackMap stack: org.jruby.RubyThread org.jruby.runtime.ThreadContext org.jruby.ext.thread.Queue org.jruby.RubyThread$Task
3: invokevirtual org.jruby.RubyThread.executeTask:(Lorg/jruby/runtime/ThreadContext;Ljava/lang/Object;Lorg/jruby/RubyThread$Task;)Ljava/lang/Object;
checkcast org.jruby.runtime.builtin.IRubyObject
4: areturn
5: StackMap locals:
StackMap stack: java.lang.InterruptedException
pop
6: aload 0
aload 1
ldc "pop"
invokevirtual org.jruby.ext.thread.Queue.createInterruptedError:(Lorg/jruby/runtime/ThreadContext;Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/jruby/ext/thread/Queue;
0 7 1 context Lorg/jruby/runtime/ThreadContext;
0 7 2 arg0 Lorg/jruby/runtime/builtin/IRubyObject;
Exception table:
from to target type
1 4 5 Class java.lang.InterruptedException
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(name = {"pop", "deq", "shift"})
MethodParameters:
Name Flags
context
arg0
public org.jruby.runtime.builtin.IRubyObject push(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokevirtual org.jruby.ext.thread.Queue.initializedCheck:()V
1: aload 0
aload 1
aload 2
invokevirtual org.jruby.ext.thread.Queue.putInternal:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)V
2: goto 5
StackMap locals:
StackMap stack: java.lang.InterruptedException
3: pop
4: aload 0
aload 1
ldc "push"
invokevirtual org.jruby.ext.thread.Queue.createInterruptedError:(Lorg/jruby/runtime/ThreadContext;Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
5: StackMap locals:
StackMap stack:
aload 0
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/jruby/ext/thread/Queue;
0 6 1 context Lorg/jruby/runtime/ThreadContext;
0 6 2 value Lorg/jruby/runtime/builtin/IRubyObject;
Exception table:
from to target type
1 2 3 Class java.lang.InterruptedException
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(name = {"push", "<<", "enq"})
MethodParameters:
Name Flags
context
value
protected void putInternal(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)V
flags: (0x0004) ACC_PROTECTED
Code:
stack=3, locals=9, args_size=3
start local 0 start local 1 start local 2 0: aload 2
ifnonnull 1
new java.lang.NullPointerException
dup
invokespecial java.lang.NullPointerException.<init>:()V
athrow
1: StackMap locals:
StackMap stack:
iconst_m1
istore 3
start local 3 2: new org.jruby.ext.thread.Queue$Node
dup
aload 2
invokespecial org.jruby.ext.thread.Queue$Node.<init>:(Lorg/jruby/runtime/builtin/IRubyObject;)V
astore 4
start local 4 3: aload 0
getfield org.jruby.ext.thread.Queue.putLock:Ljava/util/concurrent/locks/ReentrantLock;
astore 5
start local 5 4: aload 0
getfield org.jruby.ext.thread.Queue.count:Ljava/util/concurrent/atomic/AtomicInteger;
astore 6
start local 6 5: aload 5
invokevirtual java.util.concurrent.locks.ReentrantLock.lockInterruptibly:()V
6: goto 8
start local 7 7: StackMap locals: org.jruby.ext.thread.Queue org.jruby.runtime.ThreadContext org.jruby.runtime.builtin.IRubyObject int org.jruby.ext.thread.Queue$Node java.util.concurrent.locks.ReentrantLock java.util.concurrent.atomic.AtomicInteger int
StackMap stack:
aload 0
getfield org.jruby.ext.thread.Queue.notFull:Ljava/util/concurrent/locks/Condition;
invokeinterface java.util.concurrent.locks.Condition.await:()V
end local 7 8: StackMap locals:
StackMap stack:
aload 0
getfield org.jruby.ext.thread.Queue.closed:Z
dup
istore 7
start local 7 9: ifne 10
aload 6
invokevirtual java.util.concurrent.atomic.AtomicInteger.get:()I
aload 0
getfield org.jruby.ext.thread.Queue.capacity:I
if_icmpge 7
10: StackMap locals: int
StackMap stack:
iload 7
ifeq 13
11: aload 0
getfield org.jruby.ext.thread.Queue.notFull:Ljava/util/concurrent/locks/Condition;
invokeinterface java.util.concurrent.locks.Condition.signal:()V
12: aload 0
aload 1
invokevirtual org.jruby.ext.thread.Queue.raiseClosedError:(Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/runtime/builtin/IRubyObject;
pop
13: StackMap locals:
StackMap stack:
aload 0
aload 4
invokevirtual org.jruby.ext.thread.Queue.enqueue:(Lorg/jruby/ext/thread/Queue$Node;)V
14: aload 6
invokevirtual java.util.concurrent.atomic.AtomicInteger.getAndIncrement:()I
istore 3
15: iload 3
iconst_1
iadd
aload 0
getfield org.jruby.ext.thread.Queue.capacity:I
if_icmpge 21
16: aload 0
getfield org.jruby.ext.thread.Queue.notFull:Ljava/util/concurrent/locks/Condition;
invokeinterface java.util.concurrent.locks.Condition.signal:()V
end local 7 17: goto 21
StackMap locals: org.jruby.ext.thread.Queue org.jruby.runtime.ThreadContext org.jruby.runtime.builtin.IRubyObject int org.jruby.ext.thread.Queue$Node java.util.concurrent.locks.ReentrantLock java.util.concurrent.atomic.AtomicInteger
StackMap stack: java.lang.Throwable
18: astore 8
19: aload 5
invokevirtual java.util.concurrent.locks.ReentrantLock.unlock:()V
20: aload 8
athrow
21: StackMap locals:
StackMap stack:
aload 5
invokevirtual java.util.concurrent.locks.ReentrantLock.unlock:()V
22: iload 3
ifne 24
23: aload 0
invokevirtual org.jruby.ext.thread.Queue.signalNotEmpty:()V
24: StackMap locals:
StackMap stack:
return
end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 25 0 this Lorg/jruby/ext/thread/Queue;
0 25 1 context Lorg/jruby/runtime/ThreadContext;
0 25 2 e Lorg/jruby/runtime/builtin/IRubyObject;
2 25 3 c I
3 25 4 node Lorg/jruby/ext/thread/Queue$Node;
4 25 5 putLock Ljava/util/concurrent/locks/ReentrantLock;
5 25 6 count Ljava/util/concurrent/atomic/AtomicInteger;
7 8 7 isClosed Z
9 17 7 isClosed Z
Exception table:
from to target type
6 18 18 any
Exceptions:
throws java.lang.InterruptedException
MethodParameters:
Name Flags
context
e
public org.jruby.runtime.builtin.IRubyObject marshal_dump(org.jruby.runtime.ThreadContext);
descriptor: (Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 1
aload 0
invokestatic org.jruby.RubyMarshal.undumpable:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/RubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/ext/thread/Queue;
0 1 1 context Lorg/jruby/runtime/ThreadContext;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod()
MethodParameters:
Name Flags
context
public org.jruby.runtime.builtin.IRubyObject close(org.jruby.runtime.ThreadContext);
descriptor: (Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual org.jruby.ext.thread.Queue.initializedCheck:()V
1: aload 0
invokevirtual org.jruby.ext.thread.Queue.closeInternal:()V
2: goto 5
StackMap locals:
StackMap stack: java.lang.InterruptedException
3: pop
4: aload 0
aload 1
ldc "close"
invokevirtual org.jruby.ext.thread.Queue.createInterruptedError:(Lorg/jruby/runtime/ThreadContext;Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
5: StackMap locals:
StackMap stack:
aload 0
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/jruby/ext/thread/Queue;
0 6 1 context Lorg/jruby/runtime/ThreadContext;
Exception table:
from to target type
1 2 3 Class java.lang.InterruptedException
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod()
MethodParameters:
Name Flags
context
protected void closeInternal();
descriptor: ()V
flags: (0x0004) ACC_PROTECTED
Code:
stack=2, locals=7, args_size=1
start local 0 0: aload 0
getfield org.jruby.ext.thread.Queue.putLock:Ljava/util/concurrent/locks/ReentrantLock;
astore 1
start local 1 1: aload 0
getfield org.jruby.ext.thread.Queue.takeLock:Ljava/util/concurrent/locks/ReentrantLock;
astore 2
start local 2 2: aload 0
getfield org.jruby.ext.thread.Queue.count:Ljava/util/concurrent/atomic/AtomicInteger;
astore 3
start local 3 3: aload 1
invokevirtual java.util.concurrent.locks.ReentrantLock.lockInterruptibly:()V
4: aload 2
invokevirtual java.util.concurrent.locks.ReentrantLock.lockInterruptibly:()V
5: aload 0
getfield org.jruby.ext.thread.Queue.closed:Z
ifeq 9
6: aload 2
invokevirtual java.util.concurrent.locks.ReentrantLock.unlock:()V
7: aload 1
invokevirtual java.util.concurrent.locks.ReentrantLock.unlock:()V
8: return
9: StackMap locals: java.util.concurrent.locks.ReentrantLock java.util.concurrent.locks.ReentrantLock java.util.concurrent.atomic.AtomicInteger
StackMap stack:
aload 0
iconst_1
putfield org.jruby.ext.thread.Queue.closed:Z
10: aload 3
invokevirtual java.util.concurrent.atomic.AtomicInteger.get:()I
istore 4
start local 4 11: iload 4
aload 0
getfield org.jruby.ext.thread.Queue.capacity:I
if_icmplt 14
12: aload 0
getfield org.jruby.ext.thread.Queue.notFull:Ljava/util/concurrent/locks/Condition;
invokeinterface java.util.concurrent.locks.Condition.signal:()V
13: goto 20
StackMap locals: int
StackMap stack:
14: iload 4
ifne 20
15: aload 0
getfield org.jruby.ext.thread.Queue.notEmpty:Ljava/util/concurrent/locks/Condition;
invokeinterface java.util.concurrent.locks.Condition.signal:()V
16: goto 20
end local 4 StackMap locals: org.jruby.ext.thread.Queue java.util.concurrent.locks.ReentrantLock java.util.concurrent.locks.ReentrantLock java.util.concurrent.atomic.AtomicInteger
StackMap stack: java.lang.Throwable
17: astore 5
18: aload 2
invokevirtual java.util.concurrent.locks.ReentrantLock.unlock:()V
19: aload 5
athrow
start local 4 20: StackMap locals: int
StackMap stack:
aload 2
invokevirtual java.util.concurrent.locks.ReentrantLock.unlock:()V
21: goto 25
end local 4 StackMap locals: org.jruby.ext.thread.Queue java.util.concurrent.locks.ReentrantLock java.util.concurrent.locks.ReentrantLock java.util.concurrent.atomic.AtomicInteger
StackMap stack: java.lang.Throwable
22: astore 6
23: aload 1
invokevirtual java.util.concurrent.locks.ReentrantLock.unlock:()V
24: aload 6
athrow
start local 4 25: StackMap locals: int
StackMap stack:
aload 1
invokevirtual java.util.concurrent.locks.ReentrantLock.unlock:()V
26: return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 27 0 this Lorg/jruby/ext/thread/Queue;
1 27 1 putLock Ljava/util/concurrent/locks/ReentrantLock;
2 27 2 takeLock Ljava/util/concurrent/locks/ReentrantLock;
3 27 3 count Ljava/util/concurrent/atomic/AtomicInteger;
11 17 4 c I
20 22 4 c I
25 27 4 c I
Exception table:
from to target type
5 6 17 any
9 17 17 any
4 7 22 any
9 22 22 any
Exceptions:
throws java.lang.InterruptedException
public org.jruby.runtime.builtin.IRubyObject closed_p(org.jruby.runtime.ThreadContext);
descriptor: (Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual org.jruby.ext.thread.Queue.initializedCheck:()V
1: aload 1
aload 0
getfield org.jruby.ext.thread.Queue.closed:Z
invokestatic org.jruby.RubyBoolean.newBoolean:(Lorg/jruby/runtime/ThreadContext;Z)Lorg/jruby/RubyBoolean;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/jruby/ext/thread/Queue;
0 2 1 context Lorg/jruby/runtime/ThreadContext;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(name = {"closed?"})
MethodParameters:
Name Flags
context
public synchronized void shutdown();
descriptor: ()V
flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual org.jruby.ext.thread.Queue.closeInternal:()V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/jruby/ext/thread/Queue;
Exceptions:
throws java.lang.InterruptedException
public boolean isShutdown();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jruby.ext.thread.Queue.closed:Z
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/ext/thread/Queue;
public synchronized void checkShutdown();
descriptor: ()V
flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=3, locals=2, args_size=1
start local 0 0: aload 0
invokevirtual org.jruby.ext.thread.Queue.isShutdown:()Z
ifeq 3
1: aload 0
invokevirtual org.jruby.ext.thread.Queue.getRuntime:()Lorg/jruby/Ruby;
astore 1
start local 1 2: aload 1
aload 1
invokevirtual org.jruby.Ruby.getThreadError:()Lorg/jruby/RubyClass;
ldc "queue shut down"
invokestatic org.jruby.exceptions.RaiseException.from:(Lorg/jruby/Ruby;Lorg/jruby/RubyClass;Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
end local 1 3: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/jruby/ext/thread/Queue;
2 3 1 runtime Lorg/jruby/Ruby;
protected long java_length();
descriptor: ()J
flags: (0x0004) ACC_PROTECTED
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jruby.ext.thread.Queue.count:Ljava/util/concurrent/atomic/AtomicInteger;
invokevirtual java.util.concurrent.atomic.AtomicInteger.get:()I
i2l
lreturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/ext/thread/Queue;
protected org.jruby.runtime.builtin.IRubyObject takeInternal(org.jruby.runtime.ThreadContext);
descriptor: (Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0004) ACC_PROTECTED
Code:
stack=2, locals=10, args_size=2
start local 0 start local 1 0: iconst_m1
istore 3
start local 3 1: aload 0
getfield org.jruby.ext.thread.Queue.count:Ljava/util/concurrent/atomic/AtomicInteger;
astore 4
start local 4 2: aload 0
getfield org.jruby.ext.thread.Queue.takeLock:Ljava/util/concurrent/locks/ReentrantLock;
astore 5
start local 5 3: iconst_0
istore 7
start local 7 4: aload 5
invokevirtual java.util.concurrent.locks.ReentrantLock.lockInterruptibly:()V
5: goto 7
start local 6 6: StackMap locals: org.jruby.ext.thread.Queue org.jruby.runtime.ThreadContext top int java.util.concurrent.atomic.AtomicInteger java.util.concurrent.locks.ReentrantLock int int
StackMap stack:
aload 0
getfield org.jruby.ext.thread.Queue.notEmpty:Ljava/util/concurrent/locks/Condition;
invokeinterface java.util.concurrent.locks.Condition.await:()V
end local 6 7: StackMap locals: org.jruby.ext.thread.Queue org.jruby.runtime.ThreadContext top int java.util.concurrent.atomic.AtomicInteger java.util.concurrent.locks.ReentrantLock top int
StackMap stack:
aload 0
getfield org.jruby.ext.thread.Queue.closed:Z
dup
istore 6
start local 6 8: ifne 9
aload 4
invokevirtual java.util.concurrent.atomic.AtomicInteger.get:()I
ifeq 6
9: StackMap locals: org.jruby.ext.thread.Queue org.jruby.runtime.ThreadContext top int java.util.concurrent.atomic.AtomicInteger java.util.concurrent.locks.ReentrantLock int int
StackMap stack:
iload 6
ifeq 10
aload 4
invokevirtual java.util.concurrent.atomic.AtomicInteger.get:()I
ifne 10
iconst_0
goto 11
StackMap locals:
StackMap stack:
10: iconst_1
StackMap locals:
StackMap stack: int
11: istore 8
start local 8 12: iload 8
ifeq 16
13: aload 0
invokevirtual org.jruby.ext.thread.Queue.dequeue:()Lorg/jruby/runtime/builtin/IRubyObject;
astore 2
start local 2 14: aload 4
invokevirtual java.util.concurrent.atomic.AtomicInteger.getAndDecrement:()I
istore 3
15: goto 17
end local 2 16: StackMap locals: int
StackMap stack:
aload 1
getfield org.jruby.runtime.ThreadContext.nil:Lorg/jruby/runtime/builtin/IRubyObject;
astore 2
start local 2 17: StackMap locals: org.jruby.ext.thread.Queue org.jruby.runtime.ThreadContext org.jruby.runtime.builtin.IRubyObject int java.util.concurrent.atomic.AtomicInteger java.util.concurrent.locks.ReentrantLock int int int
StackMap stack:
iload 3
iconst_1
if_icmpgt 18
iload 6
ifeq 19
18: StackMap locals:
StackMap stack:
aload 0
getfield org.jruby.ext.thread.Queue.notEmpty:Ljava/util/concurrent/locks/Condition;
invokeinterface java.util.concurrent.locks.Condition.signal:()V
19: StackMap locals:
StackMap stack:
iload 8
ifeq 27
20: iload 3
aload 0
getfield org.jruby.ext.thread.Queue.capacity:I
if_icmpne 21
iconst_1
goto 22
StackMap locals:
StackMap stack:
21: iconst_0
StackMap locals:
StackMap stack: int
22: istore 7
end local 8 23: goto 27
end local 6 end local 2 StackMap locals: org.jruby.ext.thread.Queue org.jruby.runtime.ThreadContext top int java.util.concurrent.atomic.AtomicInteger java.util.concurrent.locks.ReentrantLock top int
StackMap stack: java.lang.Throwable
24: astore 9
25: aload 5
invokevirtual java.util.concurrent.locks.ReentrantLock.unlock:()V
26: aload 9
athrow
start local 2 start local 6 27: StackMap locals: org.jruby.ext.thread.Queue org.jruby.runtime.ThreadContext org.jruby.runtime.builtin.IRubyObject int java.util.concurrent.atomic.AtomicInteger java.util.concurrent.locks.ReentrantLock int int
StackMap stack:
aload 5
invokevirtual java.util.concurrent.locks.ReentrantLock.unlock:()V
28: iload 7
ifeq 30
29: aload 0
invokevirtual org.jruby.ext.thread.Queue.signalNotFull:()V
30: StackMap locals:
StackMap stack:
aload 2
areturn
end local 7 end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 31 0 this Lorg/jruby/ext/thread/Queue;
0 31 1 context Lorg/jruby/runtime/ThreadContext;
14 16 2 x Lorg/jruby/runtime/builtin/IRubyObject;
17 24 2 x Lorg/jruby/runtime/builtin/IRubyObject;
27 31 2 x Lorg/jruby/runtime/builtin/IRubyObject;
1 31 3 c I
2 31 4 count Ljava/util/concurrent/atomic/AtomicInteger;
3 31 5 takeLock Ljava/util/concurrent/locks/ReentrantLock;
6 7 6 isClosed Z
8 24 6 isClosed Z
27 31 6 isClosed Z
4 31 7 notFullSignalNeeded Z
12 23 8 canDequeue Z
Exception table:
from to target type
5 24 24 any
Exceptions:
throws java.lang.InterruptedException
MethodParameters:
Name Flags
context
public org.jruby.runtime.builtin.IRubyObject pollInternal();
descriptor: ()Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=7, args_size=1
start local 0 0: aload 0
getfield org.jruby.ext.thread.Queue.count:Ljava/util/concurrent/atomic/AtomicInteger;
astore 1
start local 1 1: aload 1
invokevirtual java.util.concurrent.atomic.AtomicInteger.get:()I
ifne 3
2: aconst_null
areturn
3: StackMap locals: java.util.concurrent.atomic.AtomicInteger
StackMap stack:
aconst_null
astore 2
start local 2 4: iconst_0
istore 3
start local 3 5: aload 0
getfield org.jruby.ext.thread.Queue.takeLock:Ljava/util/concurrent/locks/ReentrantLock;
astore 4
start local 4 6: aload 4
invokevirtual java.util.concurrent.locks.ReentrantLock.lockInterruptibly:()V
7: aload 1
invokevirtual java.util.concurrent.atomic.AtomicInteger.get:()I
ifle 19
8: aload 0
invokevirtual org.jruby.ext.thread.Queue.dequeue:()Lorg/jruby/runtime/builtin/IRubyObject;
astore 2
9: aload 1
invokevirtual java.util.concurrent.atomic.AtomicInteger.getAndDecrement:()I
istore 5
start local 5 10: iload 5
iconst_1
if_icmple 12
11: aload 0
getfield org.jruby.ext.thread.Queue.notEmpty:Ljava/util/concurrent/locks/Condition;
invokeinterface java.util.concurrent.locks.Condition.signal:()V
12: StackMap locals: org.jruby.ext.thread.Queue java.util.concurrent.atomic.AtomicInteger org.jruby.runtime.builtin.IRubyObject int java.util.concurrent.locks.ReentrantLock int
StackMap stack:
iload 5
aload 0
getfield org.jruby.ext.thread.Queue.capacity:I
if_icmpne 13
iconst_1
goto 14
StackMap locals:
StackMap stack:
13: iconst_0
StackMap locals:
StackMap stack: int
14: istore 3
end local 5 15: goto 19
StackMap locals: org.jruby.ext.thread.Queue java.util.concurrent.atomic.AtomicInteger org.jruby.runtime.builtin.IRubyObject int java.util.concurrent.locks.ReentrantLock
StackMap stack: java.lang.Throwable
16: astore 6
17: aload 4
invokevirtual java.util.concurrent.locks.ReentrantLock.unlock:()V
18: aload 6
athrow
19: StackMap locals:
StackMap stack:
aload 4
invokevirtual java.util.concurrent.locks.ReentrantLock.unlock:()V
20: iload 3
ifeq 22
21: aload 0
invokevirtual org.jruby.ext.thread.Queue.signalNotFull:()V
22: StackMap locals:
StackMap stack:
aload 2
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 23 0 this Lorg/jruby/ext/thread/Queue;
1 23 1 count Ljava/util/concurrent/atomic/AtomicInteger;
4 23 2 x Lorg/jruby/runtime/builtin/IRubyObject;
5 23 3 notFullSignalNeeded Z
6 23 4 takeLock Ljava/util/concurrent/locks/ReentrantLock;
10 15 5 c I
Exception table:
from to target type
7 16 16 any
Exceptions:
throws java.lang.InterruptedException
public org.jruby.runtime.builtin.IRubyObject raiseClosedError(org.jruby.runtime.ThreadContext);
descriptor: (Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
ldc "ClosedQueueError"
invokevirtual org.jruby.Ruby.getClass:(Ljava/lang/String;)Lorg/jruby/RubyClass;
ldc "queue closed"
invokevirtual org.jruby.Ruby.newRaiseException:(Lorg/jruby/RubyClass;Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/ext/thread/Queue;
0 1 1 context Lorg/jruby/runtime/ThreadContext;
MethodParameters:
Name Flags
context
protected org.jruby.exceptions.RaiseException createInterruptedError(org.jruby.runtime.ThreadContext, java.lang.String);
descriptor: (Lorg/jruby/runtime/ThreadContext;Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
flags: (0x0004) ACC_PROTECTED
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
new java.lang.StringBuilder
dup
ldc "interrupted in "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
invokevirtual org.jruby.ext.thread.Queue.getMetaClass:()Lorg/jruby/RubyClass;
invokevirtual org.jruby.RubyClass.getName:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "#"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 2
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual org.jruby.Ruby.newThreadError:(Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/ext/thread/Queue;
0 1 1 context Lorg/jruby/runtime/ThreadContext;
0 1 2 methodName Ljava/lang/String;
MethodParameters:
Name Flags
context
methodName
}
SourceFile: "Queue.java"
NestMembers:
org.jruby.ext.thread.Queue$1 org.jruby.ext.thread.Queue$2 org.jruby.ext.thread.Queue$3 org.jruby.ext.thread.Queue$Node
InnerClasses:
public abstract Task = org.jruby.RubyThread$Task of org.jruby.RubyThread
org.jruby.ext.thread.Queue$1
org.jruby.ext.thread.Queue$2
org.jruby.ext.thread.Queue$3
Node = org.jruby.ext.thread.Queue$Node of org.jruby.ext.thread.Queue
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyClass(name = {"Queue"})