public class org.jruby.ext.fiber.FiberQueue
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.jruby.ext.fiber.FiberQueue
super_class: java.lang.Object
{
protected java.util.concurrent.BlockingQueue<org.jruby.runtime.builtin.IRubyObject> queue;
descriptor: Ljava/util/concurrent/BlockingQueue;
flags: (0x0004) ACC_PROTECTED
Signature: Ljava/util/concurrent/BlockingQueue<Lorg/jruby/runtime/builtin/IRubyObject;>;
protected final org.jruby.Ruby runtime;
descriptor: Lorg/jruby/Ruby;
flags: (0x0014) ACC_PROTECTED, ACC_FINAL
final org.jruby.RubyThread$Task<org.jruby.ext.fiber.FiberQueue, org.jruby.runtime.builtin.IRubyObject> takeTask;
descriptor: Lorg/jruby/RubyThread$Task;
flags: (0x0010) ACC_FINAL
Signature: Lorg/jruby/RubyThread$Task<Lorg/jruby/ext/fiber/FiberQueue;Lorg/jruby/runtime/builtin/IRubyObject;>;
final org.jruby.RubyThread$Task<org.jruby.runtime.builtin.IRubyObject[], org.jruby.runtime.builtin.IRubyObject> putTask;
descriptor: Lorg/jruby/RubyThread$Task;
flags: (0x0010) ACC_FINAL
Signature: Lorg/jruby/RubyThread$Task<[Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;>;
public void <init>(org.jruby.Ruby);
descriptor: (Lorg/jruby/Ruby;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new org.jruby.ext.fiber.FiberQueue$1
dup
aload 0
invokespecial org.jruby.ext.fiber.FiberQueue$1.<init>:(Lorg/jruby/ext/fiber/FiberQueue;)V
putfield org.jruby.ext.fiber.FiberQueue.takeTask:Lorg/jruby/RubyThread$Task;
2: aload 0
new org.jruby.ext.fiber.FiberQueue$2
dup
aload 0
invokespecial org.jruby.ext.fiber.FiberQueue$2.<init>:(Lorg/jruby/ext/fiber/FiberQueue;)V
putfield org.jruby.ext.fiber.FiberQueue.putTask:Lorg/jruby/RubyThread$Task;
3: aload 0
aload 1
putfield org.jruby.ext.fiber.FiberQueue.runtime:Lorg/jruby/Ruby;
4: aload 0
new java.util.concurrent.ArrayBlockingQueue
dup
iconst_1
iconst_0
invokespecial java.util.concurrent.ArrayBlockingQueue.<init>:(IZ)V
putfield org.jruby.ext.fiber.FiberQueue.queue:Ljava/util/concurrent/BlockingQueue;
5: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/jruby/ext/fiber/FiberQueue;
0 6 1 runtime Lorg/jruby/Ruby;
MethodParameters:
Name Flags
runtime
public org.jruby.runtime.builtin.IRubyObject shutdown(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
aconst_null
putfield org.jruby.ext.fiber.FiberQueue.queue:Ljava/util/concurrent/BlockingQueue;
1: aload 1
getfield org.jruby.runtime.ThreadContext.nil:Lorg/jruby/runtime/builtin/IRubyObject;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/jruby/ext/fiber/FiberQueue;
0 2 1 context Lorg/jruby/runtime/ThreadContext;
MethodParameters:
Name Flags
context
public synchronized void shutdown();
descriptor: ()V
flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
aconst_null
putfield org.jruby.ext.fiber.FiberQueue.queue:Ljava/util/concurrent/BlockingQueue;
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/jruby/ext/fiber/FiberQueue;
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.fiber.FiberQueue.queue:Ljava/util/concurrent/BlockingQueue;
ifnonnull 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/ext/fiber/FiberQueue;
public java.util.concurrent.BlockingQueue<org.jruby.runtime.builtin.IRubyObject> getQueueSafe();
descriptor: ()Ljava/util/concurrent/BlockingQueue;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=2, args_size=1
start local 0 0: aload 0
getfield org.jruby.ext.fiber.FiberQueue.queue:Ljava/util/concurrent/BlockingQueue;
astore 1
start local 1 1: aload 0
invokevirtual org.jruby.ext.fiber.FiberQueue.checkShutdown:()V
2: aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/jruby/ext/fiber/FiberQueue;
1 3 1 queue Ljava/util/concurrent/BlockingQueue<Lorg/jruby/runtime/builtin/IRubyObject;>;
Signature: ()Ljava/util/concurrent/BlockingQueue<Lorg/jruby/runtime/builtin/IRubyObject;>;
public synchronized void checkShutdown();
descriptor: ()V
flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jruby.ext.fiber.FiberQueue.queue:Ljava/util/concurrent/BlockingQueue;
ifnonnull 2
1: aload 0
getfield org.jruby.ext.fiber.FiberQueue.runtime:Lorg/jruby/Ruby;
aload 0
getfield org.jruby.ext.fiber.FiberQueue.runtime:Lorg/jruby/Ruby;
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
2: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/jruby/ext/fiber/FiberQueue;
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=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
iconst_1
invokevirtual org.jruby.ext.fiber.FiberQueue.pop:(Lorg/jruby/runtime/ThreadContext;Z)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/fiber/FiberQueue;
0 1 1 context Lorg/jruby/runtime/ThreadContext;
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=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
aload 2
invokeinterface org.jruby.runtime.builtin.IRubyObject.isTrue:()Z
ifeq 1
iconst_0
goto 2
StackMap locals: org.jruby.ext.fiber.FiberQueue org.jruby.runtime.ThreadContext org.jruby.runtime.builtin.IRubyObject
StackMap stack: org.jruby.ext.fiber.FiberQueue org.jruby.runtime.ThreadContext
1: iconst_1
StackMap locals: org.jruby.ext.fiber.FiberQueue org.jruby.runtime.ThreadContext org.jruby.runtime.builtin.IRubyObject
StackMap stack: org.jruby.ext.fiber.FiberQueue org.jruby.runtime.ThreadContext int
2: invokevirtual org.jruby.ext.fiber.FiberQueue.pop:(Lorg/jruby/runtime/ThreadContext;Z)Lorg/jruby/runtime/builtin/IRubyObject;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/jruby/ext/fiber/FiberQueue;
0 3 1 context Lorg/jruby/runtime/ThreadContext;
0 3 2 arg0 Lorg/jruby/runtime/builtin/IRubyObject;
MethodParameters:
Name Flags
context
arg0
public void push(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject[]);
descriptor: (Lorg/jruby/runtime/ThreadContext;[Lorg/jruby/runtime/builtin/IRubyObject;)V
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.fiber.FiberQueue.checkShutdown:()V
1: aload 1
invokevirtual org.jruby.runtime.ThreadContext.getThread:()Lorg/jruby/RubyThread;
aload 1
aload 2
aload 0
getfield org.jruby.ext.fiber.FiberQueue.putTask:Lorg/jruby/RubyThread$Task;
invokevirtual org.jruby.RubyThread.executeTask:(Lorg/jruby/runtime/ThreadContext;Ljava/lang/Object;Lorg/jruby/RubyThread$Task;)Ljava/lang/Object;
pop
2: goto 5
StackMap locals:
StackMap stack: java.lang.InterruptedException
3: pop
4: aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
ldc "interrupted in FiberQueue.push"
invokevirtual org.jruby.Ruby.newThreadError:(Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
5: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/jruby/ext/fiber/FiberQueue;
0 6 1 context Lorg/jruby/runtime/ThreadContext;
0 6 2 args [Lorg/jruby/runtime/builtin/IRubyObject;
Exception table:
from to target type
1 2 3 Class java.lang.InterruptedException
MethodParameters:
Name Flags
context
args final
private org.jruby.runtime.builtin.IRubyObject pop(org.jruby.runtime.ThreadContext, boolean);
descriptor: (Lorg/jruby/runtime/ThreadContext;Z)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokevirtual org.jruby.ext.fiber.FiberQueue.getQueueSafe:()Ljava/util/concurrent/BlockingQueue;
astore 3
start local 3 1: iload 2
ifne 3
aload 3
invokeinterface java.util.concurrent.BlockingQueue.size:()I
ifne 3
2: aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
invokevirtual org.jruby.Ruby.getThreadError:()Lorg/jruby/RubyClass;
ldc "queue empty"
invokestatic org.jruby.exceptions.RaiseException.from:(Lorg/jruby/Ruby;Lorg/jruby/RubyClass;Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
3: StackMap locals: java.util.concurrent.BlockingQueue
StackMap stack:
aload 1
invokevirtual org.jruby.runtime.ThreadContext.getThread:()Lorg/jruby/RubyThread;
aload 1
aload 0
aload 0
getfield org.jruby.ext.fiber.FiberQueue.takeTask: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
4: areturn
5: StackMap locals:
StackMap stack: java.lang.InterruptedException
pop
6: aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
ldc "interrupted in FiberQueue.pop"
invokevirtual org.jruby.Ruby.newThreadError:(Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
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/fiber/FiberQueue;
0 7 1 context Lorg/jruby/runtime/ThreadContext;
0 7 2 should_block Z
1 7 3 queue Ljava/util/concurrent/BlockingQueue<Lorg/jruby/runtime/builtin/IRubyObject;>;
Exception table:
from to target type
3 4 5 Class java.lang.InterruptedException
MethodParameters:
Name Flags
context
should_block
}
SourceFile: "FiberQueue.java"
NestMembers:
org.jruby.ext.fiber.FiberQueue$1 org.jruby.ext.fiber.FiberQueue$2
InnerClasses:
public abstract Task = org.jruby.RubyThread$Task of org.jruby.RubyThread
org.jruby.ext.fiber.FiberQueue$1
org.jruby.ext.fiber.FiberQueue$2