def add()

in src/main/scala/com/twitter/stitch/Stitch.scala [2121:2132]


      def add(c: Unit): Stitch[T] = Stitch.future(p)

      def run(): Promise[T] = {
        p.become(try { Local.let(context) { f() } }
        catch {
          case e: NonLocalReturnControl[_] =>
            Future.exception(new StitchNonLocalReturnControl(e))
          case e: InterruptedException => Future.exception(e)
          case NonFatal(e) => Future.exception(e)
        })
        p
      }