private def makeTask[A]()

in hq/app/utils/attempt/Attempt.scala [229:245]


    private def makeTask[A](body: => A)(schedule: TimerTask => Unit)(implicit ctx: ExecutionContext): Future[A] = {
      val prom = Promise[A]()
      schedule(
        new TimerTask {
          def run(): Unit = {
            ctx.execute(
              new Runnable {
                def run(): Unit = {
                  prom.complete(Try(body))
                }
              }
            )
          }
        }
      )
      prom.future
    }