From 260aa0fdc4611f56f8f2b18cf63fdfc8f47a29b6 Mon Sep 17 00:00:00 2001 From: Rohan Sircar Date: Thu, 13 Aug 2020 23:02:52 +0530 Subject: [PATCH] Removed redundant thread code --- ActorDemo.sc | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/ActorDemo.sc b/ActorDemo.sc index d3d996b..dd489ba 100755 --- a/ActorDemo.sc +++ b/ActorDemo.sc @@ -77,17 +77,13 @@ object RootActor { @main def main() = { - val t = new Thread(() => { - implicit val rootActor = - ActorSystem(RootActor(), "TestActors") + implicit val rootActor = + ActorSystem(RootActor(), "TestActors") - implicit val timeout: Timeout = 3.seconds + implicit val timeout: Timeout = 3.seconds + + rootActor ! RootActor.Begin + rootActor ! RootActor.GetResult - rootActor ! RootActor.Begin - rootActor ! RootActor.GetResult - }) - t.setDaemon(true) - t.start() Thread.sleep(1000) - System.exit(0) }