Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
/** @constructor */
ScalaJS.c.monifu_concurrent_schedulers_TrampolineScheduler = (function() {
  ScalaJS.c.java_lang_Object.call(this);
  this.fallback$1 = null;
  this.reporter$1 = null;
  this.immediateQueue$1 = null;
  this.withinLoop$1 = false
});
ScalaJS.c.monifu_concurrent_schedulers_TrampolineScheduler.prototype = new ScalaJS.inheritable.java_lang_Object();
ScalaJS.c.monifu_concurrent_schedulers_TrampolineScheduler.prototype.constructor = ScalaJS.c.monifu_concurrent_schedulers_TrampolineScheduler;
ScalaJS.c.monifu_concurrent_schedulers_TrampolineScheduler.prototype.scheduleOnce__Lscala_Function0__Lmonifu_concurrent_Cancelable = (function(action) {
  return ScalaJS.impls.monifu_concurrent_Scheduler$class__scheduleOnce__Lmonifu_concurrent_Scheduler__Lscala_Function0__Lmonifu_concurrent_Cancelable(this, action)
});
ScalaJS.c.monifu_concurrent_schedulers_TrampolineScheduler.prototype.schedule__Lscala_Function1__Lmonifu_concurrent_Cancelable = (function(action) {
  return ScalaJS.impls.monifu_concurrent_Scheduler$class__schedule__Lmonifu_concurrent_Scheduler__Lscala_Function1__Lmonifu_concurrent_Cancelable(this, action)
});
ScalaJS.c.monifu_concurrent_schedulers_TrampolineScheduler.prototype.schedule__Lscala_concurrent_duration_FiniteDuration__Lscala_Function1__Lmonifu_concurrent_Cancelable = (function(initialDelay, action) {
  return ScalaJS.impls.monifu_concurrent_Scheduler$class__schedule__Lmonifu_concurrent_Scheduler__Lscala_concurrent_duration_FiniteDuration__Lscala_Function1__Lmonifu_concurrent_Cancelable(this, initialDelay, action)
});
ScalaJS.c.monifu_concurrent_schedulers_TrampolineScheduler.prototype.scheduleRepeated__Lscala_concurrent_duration_FiniteDuration__Lscala_concurrent_duration_FiniteDuration__Lscala_Function0__Lmonifu_concurrent_Cancelable = (function(initialDelay, delay, action) {
  return ScalaJS.impls.monifu_concurrent_Scheduler$class__scheduleRepeated__Lmonifu_concurrent_Scheduler__Lscala_concurrent_duration_FiniteDuration__Lscala_concurrent_duration_FiniteDuration__Lscala_Function0__Lmonifu_concurrent_Cancelable(this, initialDelay, delay, action)
});
ScalaJS.c.monifu_concurrent_schedulers_TrampolineScheduler.prototype.scheduleRecursive__Lscala_concurrent_duration_FiniteDuration__Lscala_concurrent_duration_FiniteDuration__Lscala_Function1__Lmonifu_concurrent_Cancelable = (function(initialDelay, delay, action) {
  return ScalaJS.impls.monifu_concurrent_Scheduler$class__scheduleRecursive__Lmonifu_concurrent_Scheduler__Lscala_concurrent_duration_FiniteDuration__Lscala_concurrent_duration_FiniteDuration__Lscala_Function1__Lmonifu_concurrent_Cancelable(this, initialDelay, delay, action)
});
ScalaJS.c.monifu_concurrent_schedulers_TrampolineScheduler.prototype.prepare__Lscala_concurrent_ExecutionContext = (function() {
  return ScalaJS.impls.scala_concurrent_ExecutionContext$class__prepare__Lscala_concurrent_ExecutionContext__Lscala_concurrent_ExecutionContext(this)
});
ScalaJS.c.monifu_concurrent_schedulers_TrampolineScheduler.prototype.execute__Ljava_lang_Runnable__V = (function(runnable) {
  this.immediateQueue$1 = this.immediateQueue$1.enqueue__O__Lscala_collection_immutable_Queue(runnable);
  if ((!this.withinLoop$1)) {
    this.withinLoop$1 = true;
    try {
      this.immediateLoop__p1__V()
    } finally {
      this.withinLoop$1 = false
    }
  }
});
ScalaJS.c.monifu_concurrent_schedulers_TrampolineScheduler.prototype.immediateLoop__p1__V = (function() {
  var _$this = this;
  tailCallLoop: while (true) {
    if (_$this.immediateQueue$1.nonEmpty__Z()) {
      var x1 = _$this.immediateQueue$1.dequeue__Lscala_Tuple2();
      matchEnd3: {
        if ((x1 !== null)) {
          var t = ScalaJS.as.java_lang_Runnable(x1.$$und1__O());
          var newQueue = ScalaJS.as.scala_collection_immutable_Queue(x1.$$und2__O());
          var x$1 = new ScalaJS.c.scala_Tuple2().init___O__O(t, newQueue);
          break matchEnd3
        };
        throw new ScalaJS.c.scala_MatchError().init___O(x1)
      };
      var t$2 = ScalaJS.as.java_lang_Runnable(x$1.$$und1__O());
      var newQueue$2 = ScalaJS.as.scala_collection_immutable_Queue(x$1.$$und2__O());
      _$this.immediateQueue$1 = newQueue$2;
      var task = t$2;
      try {
        task.run__V()
      } catch ($jsexc$) {
        $jsexc$ = ScalaJS.wrapJavaScriptException($jsexc$);
        var ex6 = $jsexc$;
        var x4 = ex6;
        matchEnd8: {
          var o11 = ScalaJS.modules.scala_util_control_NonFatal().unapply__Ljava_lang_Throwable__Lscala_Option(x4);
          if ((!o11.isEmpty__Z())) {
            var ex = ScalaJS.as.java_lang_Throwable(o11.get__O());
            try {
              _$this.rescheduleOnFallback__p1__Lscala_collection_immutable_Queue__V(_$this.immediateQueue$1);
              ScalaJS.modules.scala_runtime_BoxedUnit().UNIT__Lscala_runtime_BoxedUnit();
              break matchEnd8
            } finally {
              _$this.immediateQueue$1 = ScalaJS.modules.scala_collection_immutable_Queue().empty__Lscala_collection_immutable_Queue();
              _$this.reportFailure__Ljava_lang_Throwable__V(ex)
            }
          };
          throw ScalaJS.unwrapJavaScriptException(ex6)
        }
      };
      continue tailCallLoop;
      ScalaJS.modules.scala_runtime_BoxedUnit().UNIT__Lscala_runtime_BoxedUnit()
    } else {
      ScalaJS.modules.scala_runtime_BoxedUnit().UNIT__Lscala_runtime_BoxedUnit()
    };
    return undefined
  }
});
ScalaJS.c.monifu_concurrent_schedulers_TrampolineScheduler.prototype.rescheduleOnFallback__p1__Lscala_collection_immutable_Queue__V = (function(queue) {
  var _$this = this;
  tailCallLoop: while (true) {
    if (queue.nonEmpty__Z()) {
      var x1 = queue.dequeue__Lscala_Tuple2();
      matchEnd3: {
        if ((x1 !== null)) {
          var task = ScalaJS.as.java_lang_Runnable(x1.$$und1__O());
          var newQueue = ScalaJS.as.scala_collection_immutable_Queue(x1.$$und2__O());
          var x$2 = new ScalaJS.c.scala_Tuple2().init___O__O(task, newQueue);
          break matchEnd3
        };
        throw new ScalaJS.c.scala_MatchError().init___O(x1)
      };
      var task$2 = ScalaJS.as.java_lang_Runnable(x$2.$$und1__O());
      var newQueue$2 = ScalaJS.as.scala_collection_immutable_Queue(x$2.$$und2__O());
      _$this.fallback$1.execute__Ljava_lang_Runnable__V(task$2);
      queue = newQueue$2;
      continue tailCallLoop;
      ScalaJS.modules.scala_runtime_BoxedUnit().UNIT__Lscala_runtime_BoxedUnit()
    } else {
      ScalaJS.modules.scala_runtime_BoxedUnit().UNIT__Lscala_runtime_BoxedUnit()
    };
    return undefined
  }
});
ScalaJS.c.monifu_concurrent_schedulers_TrampolineScheduler.prototype.scheduleOnce__Lscala_concurrent_duration_FiniteDuration__Lscala_Function0__Lmonifu_concurrent_Cancelable = (function(initialDelay, action) {
  if (initialDelay.toMillis__J().$$less__Lscala_scalajs_runtime_Long__Z(ScalaJS.modules.scala_scalajs_runtime_Long().fromInt__I__Lscala_scalajs_runtime_Long(1))) {
    return this.scheduleOnce__Lscala_Function0__Lmonifu_concurrent_Cancelable(action)
  } else {
    return this.fallback$1.scheduleOnce__Lscala_concurrent_duration_FiniteDuration__Lscala_Function0__Lmonifu_concurrent_Cancelable(initialDelay, action)
  }
});
ScalaJS.c.monifu_concurrent_schedulers_TrampolineScheduler.prototype.reportFailure__Ljava_lang_Throwable__V = (function(t) {
  this.reporter$1.apply__O__O(t)
});
ScalaJS.c.monifu_concurrent_schedulers_TrampolineScheduler.prototype.init___Lmonifu_concurrent_Scheduler__Lscala_Function1 = (function(fallback, reporter) {
  this.fallback$1 = fallback;
  this.reporter$1 = reporter;
  ScalaJS.c.java_lang_Object.prototype.init___.call(this);
  ScalaJS.impls.scala_concurrent_ExecutionContext$class__$init$__Lscala_concurrent_ExecutionContext__V(this);
  ScalaJS.impls.monifu_concurrent_Scheduler$class__$init$__Lmonifu_concurrent_Scheduler__V(this);
  this.immediateQueue$1 = ScalaJS.modules.scala_collection_immutable_Queue().empty__Lscala_collection_immutable_Queue();
  this.withinLoop$1 = false;
  return this
});
ScalaJS.c.monifu_concurrent_schedulers_TrampolineScheduler.prototype.prepare__ = (function() {
  return this.prepare__Lscala_concurrent_ExecutionContext()
});
ScalaJS.c.monifu_concurrent_schedulers_TrampolineScheduler.prototype.scheduleRecursive__Lscala_concurrent_duration_FiniteDuration__Lscala_concurrent_duration_FiniteDuration__Lscala_Function1__ = (function(initialDelay, delay, action) {
  return this.scheduleRecursive__Lscala_concurrent_duration_FiniteDuration__Lscala_concurrent_duration_FiniteDuration__Lscala_Function1__Lmonifu_concurrent_Cancelable(initialDelay, delay, action)
});
ScalaJS.c.monifu_concurrent_schedulers_TrampolineScheduler.prototype.scheduleRepeated__Lscala_concurrent_duration_FiniteDuration__Lscala_concurrent_duration_FiniteDuration__Lscala_Function0__ = (function(initialDelay$2, delay$2, action$2) {
  return this.scheduleRepeated__Lscala_concurrent_duration_FiniteDuration__Lscala_concurrent_duration_FiniteDuration__Lscala_Function0__Lmonifu_concurrent_Cancelable(initialDelay$2, delay$2, action$2)
});
ScalaJS.c.monifu_concurrent_schedulers_TrampolineScheduler.prototype.schedule__Lscala_concurrent_duration_FiniteDuration__Lscala_Function1__ = (function(initialDelay$3, action$3) {
  return this.schedule__Lscala_concurrent_duration_FiniteDuration__Lscala_Function1__Lmonifu_concurrent_Cancelable(initialDelay$3, action$3)
});
ScalaJS.c.monifu_concurrent_schedulers_TrampolineScheduler.prototype.schedule__Lscala_Function1__ = (function(action$4) {
  return this.schedule__Lscala_Function1__Lmonifu_concurrent_Cancelable(action$4)
});
ScalaJS.c.monifu_concurrent_schedulers_TrampolineScheduler.prototype.scheduleOnce__Lscala_Function0__ = (function(action$5) {
  return this.scheduleOnce__Lscala_Function0__Lmonifu_concurrent_Cancelable(action$5)
});
ScalaJS.c.monifu_concurrent_schedulers_TrampolineScheduler.prototype.reportFailure__Ljava_lang_Throwable__ = (function(t) {
  return ScalaJS.bV(this.reportFailure__Ljava_lang_Throwable__V(t))
});
ScalaJS.c.monifu_concurrent_schedulers_TrampolineScheduler.prototype.scheduleOnce__Lscala_concurrent_duration_FiniteDuration__Lscala_Function0__ = (function(initialDelay$4, action$6) {
  return this.scheduleOnce__Lscala_concurrent_duration_FiniteDuration__Lscala_Function0__Lmonifu_concurrent_Cancelable(initialDelay$4, action$6)
});
ScalaJS.c.monifu_concurrent_schedulers_TrampolineScheduler.prototype.execute__Ljava_lang_Runnable__ = (function(runnable) {
  return ScalaJS.bV(this.execute__Ljava_lang_Runnable__V(runnable))
});
/** @constructor */
ScalaJS.inheritable.monifu_concurrent_schedulers_TrampolineScheduler = (function() {
  /*<skip>*/
});
ScalaJS.inheritable.monifu_concurrent_schedulers_TrampolineScheduler.prototype = ScalaJS.c.monifu_concurrent_schedulers_TrampolineScheduler.prototype;
ScalaJS.is.monifu_concurrent_schedulers_TrampolineScheduler = (function(obj) {
  return (!(!((obj && obj.$classData) && obj.$classData.ancestors.monifu_concurrent_schedulers_TrampolineScheduler)))
});
ScalaJS.as.monifu_concurrent_schedulers_TrampolineScheduler = (function(obj) {
  if ((ScalaJS.is.monifu_concurrent_schedulers_TrampolineScheduler(obj) || (obj === null))) {
    return obj
  } else {
    ScalaJS.throwClassCastException(obj, "monifu.concurrent.schedulers.TrampolineScheduler")
  }
});
ScalaJS.isArrayOf.monifu_concurrent_schedulers_TrampolineScheduler = (function(obj, depth) {
  return (!(!(((obj && obj.$classData) && (obj.$classData.arrayDepth === depth)) && obj.$classData.arrayBase.ancestors.monifu_concurrent_schedulers_TrampolineScheduler)))
});
ScalaJS.asArrayOf.monifu_concurrent_schedulers_TrampolineScheduler = (function(obj, depth) {
  if ((ScalaJS.isArrayOf.monifu_concurrent_schedulers_TrampolineScheduler(obj, depth) || (obj === null))) {
    return obj
  } else {
    ScalaJS.throwArrayCastException(obj, "Lmonifu.concurrent.schedulers.TrampolineScheduler;", depth)
  }
});
ScalaJS.data.monifu_concurrent_schedulers_TrampolineScheduler = new ScalaJS.ClassTypeData({
  monifu_concurrent_schedulers_TrampolineScheduler: 0
}, false, "monifu.concurrent.schedulers.TrampolineScheduler", ScalaJS.data.java_lang_Object, {
  monifu_concurrent_schedulers_TrampolineScheduler: 1,
  monifu_concurrent_Scheduler: 1,
  scala_concurrent_ExecutionContext: 1,
  java_lang_Object: 1
});
ScalaJS.c.monifu_concurrent_schedulers_TrampolineScheduler.prototype.$classData = ScalaJS.data.monifu_concurrent_schedulers_TrampolineScheduler;
//@ sourceMappingURL=TrampolineScheduler.js.map
New to GrepCode? Check out our FAQ X