Created
July 1, 2017 10:09
-
-
Save harmeetsingh0013/d69319feeebca4410a5bb1efc66ea7d6 to your computer and use it in GitHub Desktop.
This file contains 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
package com.harmeetsingh13.actors | |
import akka.actor.{Actor, ActorLogging, ActorSystem, Props} | |
/** | |
* Created by Harmeet Singh(Taara) on 1/7/17. | |
*/ | |
class HelloWorldActor extends Actor with ActorLogging { | |
override def receive: Receive = { | |
case any => | |
Thread.sleep(1000) | |
log.info(s"Hello $any") | |
} | |
} | |
object HelloWorldActor extends App { | |
val system = ActorSystem("HelloWorldSystem") | |
val ref1 = system.actorOf(Props[HelloWorldSelectionActor]) | |
for (i <- 1 to 10000) ref1 ! "James" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment