diff options
Diffstat (limited to 'tools/shared/src/main/scala/scala/scalajs/tools/env/AsyncJSRunner.scala')
-rw-r--r-- | tools/shared/src/main/scala/scala/scalajs/tools/env/AsyncJSRunner.scala | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/shared/src/main/scala/scala/scalajs/tools/env/AsyncJSRunner.scala b/tools/shared/src/main/scala/scala/scalajs/tools/env/AsyncJSRunner.scala new file mode 100644 index 0000000..09e2dda --- /dev/null +++ b/tools/shared/src/main/scala/scala/scalajs/tools/env/AsyncJSRunner.scala @@ -0,0 +1,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 +} |