Skip to content
Snippets Groups Projects
02-ExecutionContextCreate.scala 249 B
Newer Older
Matt Bovel's avatar
Matt Bovel committed
package lecture6

import scala.concurrent.ExecutionContext
@main def ExecutionContextCreate =
  val ectx = ExecutionContext.global
  ectx.execute(new Runnable:
    override def run() = log("This task is run asynchronously.")
  )
  Thread.sleep(500)