Skip to content

Instantly share code, notes, and snippets.

@ShaneDelmore
Created May 1, 2017 17:14
Show Gist options
  • Save ShaneDelmore/f20bbc915af1e08fff8fd34de4cdb1ab to your computer and use it in GitHub Desktop.
Save ShaneDelmore/f20bbc915af1e08fff8fd34de4cdb1ab to your computer and use it in GitHub Desktop.
Single threaded executor for Tut docs
import scala.concurrent.Future
import java.util.concurrent.Executor
import scala.concurrent.ExecutionContext
//Please don't do this in production code!  It is used to execute
//the documentation code synchronously to generate more readable output
implicit val synchronousExecutionContext = ExecutionContext.fromExecutor(new Executor {
  def execute(task: Runnable) = task.run()
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment