summaryrefslogtreecommitdiff
path: root/tools/shared/src/main/scala/scala/scalajs/tools/env/AsyncJSRunner.scala
blob: 09e2ddaf2557a0e2233cf398da6f1a8fab68ca4e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package scala.scalajs.tools.env

import scala.concurrent.Future

trait AsyncJSRunner {
  /** Start the associated run and returns a Future that completes when the run
   *  terminates.
   */
  def start(): Future[Unit]

  /** Abort the associated run */
  def stop(): Unit

  /** Checks whether this async runner is still running */
  def isRunning(): Boolean

  /** Await completion of the started Run. Throws if the run failed */
  def await(): Unit
}