Last active
July 26, 2016 14:18
-
-
Save cvogt/61f13dbf79202fee6568d8dd6aab5bab to your computer and use it in GitHub Desktop.
SynchronousExecutionContext - for debugging
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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