Skip to content

Instantly share code, notes, and snippets.

@vigneshwaranr
Created February 14, 2021 07:10
Show Gist options
  • Save vigneshwaranr/33caf341410567e732161362cf83f66d to your computer and use it in GitHub Desktop.
Save vigneshwaranr/33caf341410567e732161362cf83f66d to your computer and use it in GitHub Desktop.
import scala.concurrent.Future
trait AsyncJob {
def execute(): Future[Boolean]
}
class MyLongRunningJob(asyncJob: AsyncJob) extends Runnable {
override def run(): Unit = {
asyncJob.execute()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment