Created
February 14, 2021 07:10
-
-
Save vigneshwaranr/33caf341410567e732161362cf83f66d to your computer and use it in GitHub Desktop.
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.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