public class java.util.concurrent.FutureTask<V> implements java.util.concurrent.RunnableFuture<V>
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: java.util.concurrent.FutureTask
super_class: java.lang.Object
{
private volatile int state;
descriptor: I
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
private static final int NEW;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 0
private static final int COMPLETING;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 1
private static final int NORMAL;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 2
private static final int EXCEPTIONAL;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 3
private static final int CANCELLED;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 4
private static final int INTERRUPTING;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 5
private static final int INTERRUPTED;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 6
private java.util.concurrent.Callable<V> callable;
descriptor: Ljava/util/concurrent/Callable;
flags: (0x0002) ACC_PRIVATE
Signature: Ljava/util/concurrent/Callable<TV;>;
private java.lang.Object outcome;
descriptor: Ljava/lang/Object;
flags: (0x0002) ACC_PRIVATE
private volatile java.lang.Thread runner;
descriptor: Ljava/lang/Thread;
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
private volatile java.util.concurrent.FutureTask$WaitNode waiters;
descriptor: Ljava/util/concurrent/FutureTask$WaitNode;
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
private static final sun.misc.Unsafe UNSAFE;
descriptor: Lsun/misc/Unsafe;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final long stateOffset;
descriptor: J
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final long runnerOffset;
descriptor: J
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final long waitersOffset;
descriptor: J
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=3, locals=1, args_size=0
0: invokestatic sun.misc.Unsafe.getUnsafe:()Lsun/misc/Unsafe;
putstatic java.util.concurrent.FutureTask.UNSAFE:Lsun/misc/Unsafe;
1: ldc Ljava/util/concurrent/FutureTask;
astore 0
start local 0 2: getstatic java.util.concurrent.FutureTask.UNSAFE:Lsun/misc/Unsafe;
3: aload 0
ldc "state"
invokevirtual java.lang.Class.getDeclaredField:(Ljava/lang/String;)Ljava/lang/reflect/Field;
4: invokevirtual sun.misc.Unsafe.objectFieldOffset:(Ljava/lang/reflect/Field;)J
putstatic java.util.concurrent.FutureTask.stateOffset:J
5: getstatic java.util.concurrent.FutureTask.UNSAFE:Lsun/misc/Unsafe;
6: aload 0
ldc "runner"
invokevirtual java.lang.Class.getDeclaredField:(Ljava/lang/String;)Ljava/lang/reflect/Field;
7: invokevirtual sun.misc.Unsafe.objectFieldOffset:(Ljava/lang/reflect/Field;)J
putstatic java.util.concurrent.FutureTask.runnerOffset:J
8: getstatic java.util.concurrent.FutureTask.UNSAFE:Lsun/misc/Unsafe;
9: aload 0
ldc "waiters"
invokevirtual java.lang.Class.getDeclaredField:(Ljava/lang/String;)Ljava/lang/reflect/Field;
10: invokevirtual sun.misc.Unsafe.objectFieldOffset:(Ljava/lang/reflect/Field;)J
putstatic java.util.concurrent.FutureTask.waitersOffset:J
end local 0 11: goto 14
StackMap locals:
StackMap stack: java.lang.Exception
12: astore 0
start local 0 13: new java.lang.Error
dup
aload 0
invokespecial java.lang.Error.<init>:(Ljava/lang/Throwable;)V
athrow
end local 0 14: StackMap locals:
StackMap stack:
return
LocalVariableTable:
Start End Slot Name Signature
2 11 0 k Ljava/lang/Class<*>;
13 14 0 e Ljava/lang/Exception;
Exception table:
from to target type
0 11 12 Class java.lang.Exception
private V report();
descriptor: (I)Ljava/lang/Object;
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: aload 0
getfield java.util.concurrent.FutureTask.outcome:Ljava/lang/Object;
astore 2
start local 2 1: iload 1
iconst_2
if_icmpne 3
2: aload 2
areturn
3: StackMap locals: java.lang.Object
StackMap stack:
iload 1
iconst_4
if_icmplt 5
4: new java.util.concurrent.CancellationException
dup
invokespecial java.util.concurrent.CancellationException.<init>:()V
athrow
5: StackMap locals:
StackMap stack:
new java.util.concurrent.ExecutionException
dup
aload 2
checkcast java.lang.Throwable
invokespecial java.util.concurrent.ExecutionException.<init>:(Ljava/lang/Throwable;)V
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Ljava/util/concurrent/FutureTask<TV;>;
0 6 1 s I
1 6 2 x Ljava/lang/Object;
Exceptions:
throws java.util.concurrent.ExecutionException
Signature: (I)TV;
MethodParameters:
Name Flags
s
public void <init>(java.util.concurrent.Callable<V>);
descriptor: (Ljava/util/concurrent/Callable;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 1
ifnonnull 3
2: new java.lang.NullPointerException
dup
invokespecial java.lang.NullPointerException.<init>:()V
athrow
3: StackMap locals: java.util.concurrent.FutureTask java.util.concurrent.Callable
StackMap stack:
aload 0
aload 1
putfield java.util.concurrent.FutureTask.callable:Ljava/util/concurrent/Callable;
4: aload 0
iconst_0
putfield java.util.concurrent.FutureTask.state:I
5: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Ljava/util/concurrent/FutureTask<TV;>;
0 6 1 callable Ljava/util/concurrent/Callable<TV;>;
Signature: (Ljava/util/concurrent/Callable<TV;>;)V
MethodParameters:
Name Flags
callable
public void <init>(java.lang.Runnable, );
descriptor: (Ljava/lang/Runnable;Ljava/lang/Object;)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
invokespecial java.lang.Object.<init>:()V
1: aload 0
aload 1
aload 2
invokestatic java.util.concurrent.Executors.callable:(Ljava/lang/Runnable;Ljava/lang/Object;)Ljava/util/concurrent/Callable;
putfield java.util.concurrent.FutureTask.callable:Ljava/util/concurrent/Callable;
2: aload 0
iconst_0
putfield java.util.concurrent.FutureTask.state:I
3: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Ljava/util/concurrent/FutureTask<TV;>;
0 4 1 runnable Ljava/lang/Runnable;
0 4 2 result TV;
Signature: (Ljava/lang/Runnable;TV;)V
MethodParameters:
Name Flags
runnable
result
public boolean isCancelled();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield java.util.concurrent.FutureTask.state:I
iconst_4
if_icmplt 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 Ljava/util/concurrent/FutureTask<TV;>;
public boolean isDone();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield java.util.concurrent.FutureTask.state:I
ifeq 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 Ljava/util/concurrent/FutureTask<TV;>;
public boolean cancel(boolean);
descriptor: (Z)Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=3, args_size=2
start local 0 start local 1 0: aload 0
getfield java.util.concurrent.FutureTask.state:I
ifeq 2
1: iconst_0
ireturn
2: StackMap locals:
StackMap stack:
iload 1
ifeq 10
3: getstatic java.util.concurrent.FutureTask.UNSAFE:Lsun/misc/Unsafe;
aload 0
getstatic java.util.concurrent.FutureTask.stateOffset:J
iconst_0
iconst_5
invokevirtual sun.misc.Unsafe.compareAndSwapInt:(Ljava/lang/Object;JII)Z
ifne 5
4: iconst_0
ireturn
5: StackMap locals:
StackMap stack:
aload 0
getfield java.util.concurrent.FutureTask.runner:Ljava/lang/Thread;
astore 2
start local 2 6: aload 2
ifnull 8
7: aload 2
invokevirtual java.lang.Thread.interrupt:()V
8: StackMap locals: java.lang.Thread
StackMap stack:
getstatic java.util.concurrent.FutureTask.UNSAFE:Lsun/misc/Unsafe;
aload 0
getstatic java.util.concurrent.FutureTask.stateOffset:J
bipush 6
invokevirtual sun.misc.Unsafe.putOrderedInt:(Ljava/lang/Object;JI)V
end local 2 9: goto 12
10: StackMap locals:
StackMap stack:
getstatic java.util.concurrent.FutureTask.UNSAFE:Lsun/misc/Unsafe;
aload 0
getstatic java.util.concurrent.FutureTask.stateOffset:J
iconst_0
iconst_4
invokevirtual sun.misc.Unsafe.compareAndSwapInt:(Ljava/lang/Object;JII)Z
ifne 12
11: iconst_0
ireturn
12: StackMap locals:
StackMap stack:
aload 0
invokevirtual java.util.concurrent.FutureTask.finishCompletion:()V
13: iconst_1
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 this Ljava/util/concurrent/FutureTask<TV;>;
0 14 1 mayInterruptIfRunning Z
6 9 2 t Ljava/lang/Thread;
MethodParameters:
Name Flags
mayInterruptIfRunning
public V get();
descriptor: ()Ljava/lang/Object;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=2, args_size=1
start local 0 0: aload 0
getfield java.util.concurrent.FutureTask.state:I
istore 1
start local 1 1: iload 1
iconst_1
if_icmpgt 3
2: aload 0
iconst_0
lconst_0
invokevirtual java.util.concurrent.FutureTask.awaitDone:(ZJ)I
istore 1
3: StackMap locals: int
StackMap stack:
aload 0
iload 1
invokevirtual java.util.concurrent.FutureTask.report:(I)Ljava/lang/Object;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Ljava/util/concurrent/FutureTask<TV;>;
1 4 1 s I
Exceptions:
throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
Signature: ()TV;
public V get(long, java.util.concurrent.TimeUnit);
descriptor: (JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=5, args_size=3
start local 0 start local 1 start local 3 0: aload 3
ifnonnull 2
1: new java.lang.NullPointerException
dup
invokespecial java.lang.NullPointerException.<init>:()V
athrow
2: StackMap locals:
StackMap stack:
aload 0
getfield java.util.concurrent.FutureTask.state:I
istore 4
start local 4 3: iload 4
iconst_1
if_icmpgt 6
4: aload 0
iconst_1
aload 3
lload 1
invokevirtual java.util.concurrent.TimeUnit.toNanos:(J)J
invokevirtual java.util.concurrent.FutureTask.awaitDone:(ZJ)I
dup
istore 4
iconst_1
if_icmpgt 6
5: new java.util.concurrent.TimeoutException
dup
invokespecial java.util.concurrent.TimeoutException.<init>:()V
athrow
6: StackMap locals: int
StackMap stack:
aload 0
iload 4
invokevirtual java.util.concurrent.FutureTask.report:(I)Ljava/lang/Object;
areturn
end local 4 end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Ljava/util/concurrent/FutureTask<TV;>;
0 7 1 timeout J
0 7 3 unit Ljava/util/concurrent/TimeUnit;
3 7 4 s I
Exceptions:
throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException
Signature: (JLjava/util/concurrent/TimeUnit;)TV;
MethodParameters:
Name Flags
timeout
unit
protected void done();
descriptor: ()V
flags: (0x0004) ACC_PROTECTED
Code:
stack=0, locals=1, args_size=1
start local 0 0: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljava/util/concurrent/FutureTask<TV;>;
protected void set();
descriptor: (Ljava/lang/Object;)V
flags: (0x0004) ACC_PROTECTED
Code:
stack=6, locals=2, args_size=2
start local 0 start local 1 0: getstatic java.util.concurrent.FutureTask.UNSAFE:Lsun/misc/Unsafe;
aload 0
getstatic java.util.concurrent.FutureTask.stateOffset:J
iconst_0
iconst_1
invokevirtual sun.misc.Unsafe.compareAndSwapInt:(Ljava/lang/Object;JII)Z
ifeq 4
1: aload 0
aload 1
putfield java.util.concurrent.FutureTask.outcome:Ljava/lang/Object;
2: getstatic java.util.concurrent.FutureTask.UNSAFE:Lsun/misc/Unsafe;
aload 0
getstatic java.util.concurrent.FutureTask.stateOffset:J
iconst_2
invokevirtual sun.misc.Unsafe.putOrderedInt:(Ljava/lang/Object;JI)V
3: aload 0
invokevirtual java.util.concurrent.FutureTask.finishCompletion:()V
4: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Ljava/util/concurrent/FutureTask<TV;>;
0 5 1 v TV;
Signature: (TV;)V
MethodParameters:
Name Flags
v
protected void setException(java.lang.Throwable);
descriptor: (Ljava/lang/Throwable;)V
flags: (0x0004) ACC_PROTECTED
Code:
stack=6, locals=2, args_size=2
start local 0 start local 1 0: getstatic java.util.concurrent.FutureTask.UNSAFE:Lsun/misc/Unsafe;
aload 0
getstatic java.util.concurrent.FutureTask.stateOffset:J
iconst_0
iconst_1
invokevirtual sun.misc.Unsafe.compareAndSwapInt:(Ljava/lang/Object;JII)Z
ifeq 4
1: aload 0
aload 1
putfield java.util.concurrent.FutureTask.outcome:Ljava/lang/Object;
2: getstatic java.util.concurrent.FutureTask.UNSAFE:Lsun/misc/Unsafe;
aload 0
getstatic java.util.concurrent.FutureTask.stateOffset:J
iconst_3
invokevirtual sun.misc.Unsafe.putOrderedInt:(Ljava/lang/Object;JI)V
3: aload 0
invokevirtual java.util.concurrent.FutureTask.finishCompletion:()V
4: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Ljava/util/concurrent/FutureTask<TV;>;
0 5 1 t Ljava/lang/Throwable;
MethodParameters:
Name Flags
t
public void run();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=7, args_size=1
start local 0 0: aload 0
getfield java.util.concurrent.FutureTask.state:I
ifne 5
1: getstatic java.util.concurrent.FutureTask.UNSAFE:Lsun/misc/Unsafe;
aload 0
getstatic java.util.concurrent.FutureTask.runnerOffset:J
2: aconst_null
invokestatic java.lang.Thread.currentThread:()Ljava/lang/Thread;
3: invokevirtual sun.misc.Unsafe.compareAndSwapObject:(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z
4: ifne 6
5: StackMap locals:
StackMap stack:
return
6: StackMap locals:
StackMap stack:
aload 0
getfield java.util.concurrent.FutureTask.callable:Ljava/util/concurrent/Callable;
astore 1
start local 1 7: aload 1
ifnull 24
aload 0
getfield java.util.concurrent.FutureTask.state:I
ifne 24
8: aload 1
invokeinterface java.util.concurrent.Callable.call:()Ljava/lang/Object;
astore 2
start local 2 9: iconst_1
istore 3
start local 3 10: goto 15
end local 3 end local 2 StackMap locals: java.util.concurrent.FutureTask java.util.concurrent.Callable
StackMap stack: java.lang.Throwable
11: astore 4
start local 4 12: aconst_null
astore 2
start local 2 13: iconst_0
istore 3
start local 3 14: aload 0
aload 4
invokevirtual java.util.concurrent.FutureTask.setException:(Ljava/lang/Throwable;)V
end local 4 15: StackMap locals: java.lang.Object int
StackMap stack:
iload 3
ifeq 24
16: aload 0
aload 2
invokevirtual java.util.concurrent.FutureTask.set:(Ljava/lang/Object;)V
end local 3 end local 2 end local 1 17: goto 24
StackMap locals: java.util.concurrent.FutureTask
StackMap stack: java.lang.Throwable
18: astore 5
19: aload 0
aconst_null
putfield java.util.concurrent.FutureTask.runner:Ljava/lang/Thread;
20: aload 0
getfield java.util.concurrent.FutureTask.state:I
istore 6
start local 6 21: iload 6
iconst_5
if_icmplt 23
22: aload 0
iload 6
invokevirtual java.util.concurrent.FutureTask.handlePossibleCancellationInterrupt:(I)V
end local 6 23: StackMap locals: java.util.concurrent.FutureTask top top top top java.lang.Throwable
StackMap stack:
aload 5
athrow
24: StackMap locals: java.util.concurrent.FutureTask
StackMap stack:
aload 0
aconst_null
putfield java.util.concurrent.FutureTask.runner:Ljava/lang/Thread;
25: aload 0
getfield java.util.concurrent.FutureTask.state:I
istore 6
start local 6 26: iload 6
iconst_5
if_icmplt 28
27: aload 0
iload 6
invokevirtual java.util.concurrent.FutureTask.handlePossibleCancellationInterrupt:(I)V
end local 6 28: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 29 0 this Ljava/util/concurrent/FutureTask<TV;>;
7 17 1 c Ljava/util/concurrent/Callable<TV;>;
9 11 2 result TV;
13 17 2 result TV;
10 11 3 ran Z
14 17 3 ran Z
12 15 4 ex Ljava/lang/Throwable;
21 23 6 s I
26 28 6 s I
Exception table:
from to target type
8 10 11 Class java.lang.Throwable
6 18 18 any
protected boolean runAndReset();
descriptor: ()Z
flags: (0x0004) ACC_PROTECTED
Code:
stack=6, locals=6, args_size=1
start local 0 0: aload 0
getfield java.util.concurrent.FutureTask.state:I
ifne 5
1: getstatic java.util.concurrent.FutureTask.UNSAFE:Lsun/misc/Unsafe;
aload 0
getstatic java.util.concurrent.FutureTask.runnerOffset:J
2: aconst_null
invokestatic java.lang.Thread.currentThread:()Ljava/lang/Thread;
3: invokevirtual sun.misc.Unsafe.compareAndSwapObject:(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z
4: ifne 6
5: StackMap locals:
StackMap stack:
iconst_0
ireturn
6: StackMap locals:
StackMap stack:
iconst_0
istore 1
start local 1 7: aload 0
getfield java.util.concurrent.FutureTask.state:I
istore 2
start local 2 8: aload 0
getfield java.util.concurrent.FutureTask.callable:Ljava/util/concurrent/Callable;
astore 3
start local 3 9: aload 3
ifnull 22
iload 2
ifne 22
10: aload 3
invokeinterface java.util.concurrent.Callable.call:()Ljava/lang/Object;
pop
11: iconst_1
istore 1
12: goto 22
StackMap locals: java.util.concurrent.FutureTask int int java.util.concurrent.Callable
StackMap stack: java.lang.Throwable
13: astore 4
start local 4 14: aload 0
aload 4
invokevirtual java.util.concurrent.FutureTask.setException:(Ljava/lang/Throwable;)V
end local 4 end local 3 15: goto 22
StackMap locals: java.util.concurrent.FutureTask int int
StackMap stack: java.lang.Throwable
16: astore 5
17: aload 0
aconst_null
putfield java.util.concurrent.FutureTask.runner:Ljava/lang/Thread;
18: aload 0
getfield java.util.concurrent.FutureTask.state:I
istore 2
19: iload 2
iconst_5
if_icmplt 21
20: aload 0
iload 2
invokevirtual java.util.concurrent.FutureTask.handlePossibleCancellationInterrupt:(I)V
21: StackMap locals: java.util.concurrent.FutureTask int int top top java.lang.Throwable
StackMap stack:
aload 5
athrow
22: StackMap locals: java.util.concurrent.FutureTask int int
StackMap stack:
aload 0
aconst_null
putfield java.util.concurrent.FutureTask.runner:Ljava/lang/Thread;
23: aload 0
getfield java.util.concurrent.FutureTask.state:I
istore 2
24: iload 2
iconst_5
if_icmplt 26
25: aload 0
iload 2
invokevirtual java.util.concurrent.FutureTask.handlePossibleCancellationInterrupt:(I)V
26: StackMap locals:
StackMap stack:
iload 1
ifeq 27
iload 2
ifne 27
iconst_1
ireturn
StackMap locals:
StackMap stack:
27: iconst_0
ireturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 28 0 this Ljava/util/concurrent/FutureTask<TV;>;
7 28 1 ran Z
8 28 2 s I
9 15 3 c Ljava/util/concurrent/Callable<TV;>;
14 15 4 ex Ljava/lang/Throwable;
Exception table:
from to target type
10 12 13 Class java.lang.Throwable
8 16 16 any
private void handlePossibleCancellationInterrupt(int);
descriptor: (I)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: iload 1
iconst_5
if_icmpne 4
1: goto 3
2: StackMap locals:
StackMap stack:
invokestatic java.lang.Thread.yield:()V
3: StackMap locals:
StackMap stack:
aload 0
getfield java.util.concurrent.FutureTask.state:I
iconst_5
if_icmpeq 2
4: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Ljava/util/concurrent/FutureTask<TV;>;
0 5 1 s I
MethodParameters:
Name Flags
s
private void finishCompletion();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=6, locals=4, args_size=1
start local 0 0: goto 12
start local 1 1: StackMap locals: java.util.concurrent.FutureTask$WaitNode
StackMap stack:
getstatic java.util.concurrent.FutureTask.UNSAFE:Lsun/misc/Unsafe;
aload 0
getstatic java.util.concurrent.FutureTask.waitersOffset:J
aload 1
aconst_null
invokevirtual sun.misc.Unsafe.compareAndSwapObject:(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z
ifeq 12
2: StackMap locals:
StackMap stack:
aload 1
getfield java.util.concurrent.FutureTask$WaitNode.thread:Ljava/lang/Thread;
astore 2
start local 2 3: aload 2
ifnull 6
4: aload 1
aconst_null
putfield java.util.concurrent.FutureTask$WaitNode.thread:Ljava/lang/Thread;
5: aload 2
invokestatic java.util.concurrent.locks.LockSupport.unpark:(Ljava/lang/Thread;)V
6: StackMap locals: java.lang.Thread
StackMap stack:
aload 1
getfield java.util.concurrent.FutureTask$WaitNode.next:Ljava/util/concurrent/FutureTask$WaitNode;
astore 3
start local 3 7: aload 3
ifnonnull 9
8: goto 14
9: StackMap locals: java.util.concurrent.FutureTask$WaitNode
StackMap stack:
aload 1
aconst_null
putfield java.util.concurrent.FutureTask$WaitNode.next:Ljava/util/concurrent/FutureTask$WaitNode;
10: aload 3
astore 1
end local 3 end local 2 11: goto 2
end local 1 12: StackMap locals:
StackMap stack:
aload 0
getfield java.util.concurrent.FutureTask.waiters:Ljava/util/concurrent/FutureTask$WaitNode;
dup
astore 1
start local 1 13: ifnonnull 1
end local 1 14: StackMap locals:
StackMap stack:
aload 0
invokevirtual java.util.concurrent.FutureTask.done:()V
15: aload 0
aconst_null
putfield java.util.concurrent.FutureTask.callable:Ljava/util/concurrent/Callable;
16: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 17 0 this Ljava/util/concurrent/FutureTask<TV;>;
1 12 1 q Ljava/util/concurrent/FutureTask$WaitNode;
13 14 1 q Ljava/util/concurrent/FutureTask$WaitNode;
3 11 2 t Ljava/lang/Thread;
7 11 3 next Ljava/util/concurrent/FutureTask$WaitNode;
private int awaitDone(boolean, long);
descriptor: (ZJ)I
flags: (0x0002) ACC_PRIVATE
Code:
stack=7, locals=9, args_size=3
start local 0 start local 1 start local 2 0: iload 1
ifeq 1
invokestatic java.lang.System.nanoTime:()J
lload 2
ladd
goto 2
StackMap locals:
StackMap stack:
1: lconst_0
StackMap locals:
StackMap stack: long
2: lstore 4
start local 4 3: aconst_null
astore 6
start local 6 4: iconst_0
istore 7
start local 7 5: StackMap locals: long java.util.concurrent.FutureTask$WaitNode int
StackMap stack:
invokestatic java.lang.Thread.interrupted:()Z
ifeq 8
6: aload 0
aload 6
invokevirtual java.util.concurrent.FutureTask.removeWaiter:(Ljava/util/concurrent/FutureTask$WaitNode;)V
7: new java.lang.InterruptedException
dup
invokespecial java.lang.InterruptedException.<init>:()V
athrow
8: StackMap locals:
StackMap stack:
aload 0
getfield java.util.concurrent.FutureTask.state:I
istore 8
start local 8 9: iload 8
iconst_1
if_icmple 13
10: aload 6
ifnull 12
11: aload 6
aconst_null
putfield java.util.concurrent.FutureTask$WaitNode.thread:Ljava/lang/Thread;
12: StackMap locals: int
StackMap stack:
iload 8
ireturn
13: StackMap locals:
StackMap stack:
iload 8
iconst_1
if_icmpne 15
14: invokestatic java.lang.Thread.yield:()V
goto 5
15: StackMap locals:
StackMap stack:
aload 6
ifnonnull 17
16: new java.util.concurrent.FutureTask$WaitNode
dup
invokespecial java.util.concurrent.FutureTask$WaitNode.<init>:()V
astore 6
goto 5
17: StackMap locals:
StackMap stack:
iload 7
ifne 22
18: getstatic java.util.concurrent.FutureTask.UNSAFE:Lsun/misc/Unsafe;
aload 0
getstatic java.util.concurrent.FutureTask.waitersOffset:J
19: aload 6
aload 0
getfield java.util.concurrent.FutureTask.waiters:Ljava/util/concurrent/FutureTask$WaitNode;
dup_x1
putfield java.util.concurrent.FutureTask$WaitNode.next:Ljava/util/concurrent/FutureTask$WaitNode;
aload 6
20: invokevirtual sun.misc.Unsafe.compareAndSwapObject:(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z
istore 7
21: goto 5
22: StackMap locals:
StackMap stack:
iload 1
ifeq 29
23: lload 4
invokestatic java.lang.System.nanoTime:()J
lsub
lstore 2
24: lload 2
lconst_0
lcmp
ifgt 27
25: aload 0
aload 6
invokevirtual java.util.concurrent.FutureTask.removeWaiter:(Ljava/util/concurrent/FutureTask$WaitNode;)V
26: aload 0
getfield java.util.concurrent.FutureTask.state:I
ireturn
27: StackMap locals:
StackMap stack:
aload 0
lload 2
invokestatic java.util.concurrent.locks.LockSupport.parkNanos:(Ljava/lang/Object;J)V
28: goto 5
29: StackMap locals:
StackMap stack:
aload 0
invokestatic java.util.concurrent.locks.LockSupport.park:(Ljava/lang/Object;)V
end local 8 30: goto 5
end local 7 end local 6 end local 4 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 31 0 this Ljava/util/concurrent/FutureTask<TV;>;
0 31 1 timed Z
0 31 2 nanos J
3 31 4 deadline J
4 31 6 q Ljava/util/concurrent/FutureTask$WaitNode;
5 31 7 queued Z
9 30 8 s I
Exceptions:
throws java.lang.InterruptedException
MethodParameters:
Name Flags
timed
nanos
private void removeWaiter(java.util.concurrent.FutureTask$WaitNode);
descriptor: (Ljava/util/concurrent/FutureTask$WaitNode;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=6, locals=5, args_size=2
start local 0 start local 1 0: aload 1
ifnull 19
1: aload 1
aconst_null
putfield java.util.concurrent.FutureTask$WaitNode.thread:Ljava/lang/Thread;
2: StackMap locals:
StackMap stack:
aconst_null
astore 2
start local 2 3: aload 0
getfield java.util.concurrent.FutureTask.waiters:Ljava/util/concurrent/FutureTask$WaitNode;
astore 3
start local 3 4: goto 18
5: StackMap locals: java.util.concurrent.FutureTask$WaitNode java.util.concurrent.FutureTask$WaitNode
StackMap stack:
aload 3
getfield java.util.concurrent.FutureTask$WaitNode.next:Ljava/util/concurrent/FutureTask$WaitNode;
astore 4
start local 4 6: aload 3
getfield java.util.concurrent.FutureTask$WaitNode.thread:Ljava/lang/Thread;
ifnull 8
7: aload 3
astore 2
goto 17
8: StackMap locals: java.util.concurrent.FutureTask$WaitNode
StackMap stack:
aload 2
ifnull 12
9: aload 2
aload 4
putfield java.util.concurrent.FutureTask$WaitNode.next:Ljava/util/concurrent/FutureTask$WaitNode;
10: aload 2
getfield java.util.concurrent.FutureTask$WaitNode.thread:Ljava/lang/Thread;
ifnonnull 17
11: goto 2
12: StackMap locals:
StackMap stack:
getstatic java.util.concurrent.FutureTask.UNSAFE:Lsun/misc/Unsafe;
aload 0
getstatic java.util.concurrent.FutureTask.waitersOffset:J
13: aload 3
aload 4
14: invokevirtual sun.misc.Unsafe.compareAndSwapObject:(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z
15: ifne 17
16: goto 2
17: StackMap locals:
StackMap stack:
aload 4
astore 3
end local 4 StackMap locals:
StackMap stack:
18: aload 3
ifnonnull 5
end local 3 end local 2 19: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 20 0 this Ljava/util/concurrent/FutureTask<TV;>;
0 20 1 node Ljava/util/concurrent/FutureTask$WaitNode;
3 19 2 pred Ljava/util/concurrent/FutureTask$WaitNode;
4 19 3 q Ljava/util/concurrent/FutureTask$WaitNode;
6 18 4 s Ljava/util/concurrent/FutureTask$WaitNode;
MethodParameters:
Name Flags
node
}
Signature: <V:Ljava/lang/Object;>Ljava/lang/Object;Ljava/util/concurrent/RunnableFuture<TV;>;
SourceFile: "FutureTask.java"
NestMembers:
java.util.concurrent.FutureTask$WaitNode
InnerClasses:
final WaitNode = java.util.concurrent.FutureTask$WaitNode of java.util.concurrent.FutureTask