Thread.prototype.idle = Thread.prototype.sleep = function () {
  return !this.running() && !this.terminated
    && (this._latestTask === 0
    || (_.now() - this._latestTask) > this.idleTime)
}