Skip to content

Instantly share code, notes, and snippets.

@cvogt
Last active July 26, 2016 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cvogt/61f13dbf79202fee6568d8dd6aab5bab to your computer and use it in GitHub Desktop.
Save cvogt/61f13dbf79202fee6568d8dd6aab5bab to your computer and use it in GitHub Desktop.
SynchronousExecutionContext - for debugging
import scala.concurrent._
import scala.concurrent.duration._
trait SynchronousExecutionContext
object SynchronousExecutionContext extends ExecutionContext with SynchronousExecutionContext {
def execute( runnable: Runnable ): Unit = runnable.run
def reportFailure( cause: Throwable ): Unit = throw new Exception( cause )
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment