コード例 #1
0
 @Override
 public void unpark(Object unblocker) {
   super.unpark(
       unblocker == FiberTask.EMERGENCY_UNBLOCKER
           ? ParkableForkJoinTask.EMERGENCY_UNBLOCKER
           : unblocker);
 }
コード例 #2
0
 @Override
 @DontInstrument
 public void yield() throws SuspendExecution {
   try {
     super.yield();
   } catch (SuspendExecution p) {
     throw p;
   } catch (Exception e) {
     throw new AssertionError(e);
   }
 }
コード例 #3
0
 @Override
 public void setState(int state) {
   super.setState(state);
 }
コード例 #4
0
 @Override
 protected void onParked(boolean yield) {
   super.onParked(yield);
   fiber.onParked();
 }
コード例 #5
0
 @Override
 public void doPark(boolean yield) {
   super.doPark(yield);
 }
コード例 #6
0
 @Override
 Object getCurrentTarget(Thread currentThread) {
   if (isFiberThread(currentThread)) return ParkableForkJoinTask.getTarget(currentThread);
   else return Fiber.getCurrentStrand();
 }
コード例 #7
0
 @Override
 void setCurrentTarget(Object target, Thread currentThread) {
   if (isFiberThread(currentThread)) ParkableForkJoinTask.setTarget(currentThread, target);
   else Fiber.setCurrentStrand((Strand) target);
 }
コード例 #8
0
 @Override
 void setCurrentFiber(Fiber target, Thread currentThread) {
   if (isFiberThread(currentThread))
     ParkableForkJoinTask.setTarget(currentThread, target.fiberRef);
   else Fiber.setCurrentStrand(target);
 }
コード例 #9
0
 static Fiber getTargetFiber(Thread thread) {
   final Object target = ParkableForkJoinTask.getTarget(thread);
   if (target == null || !(target instanceof Fiber.DummyRunnable)) return null;
   return ((Fiber.DummyRunnable) target).fiber;
 }