scala - Actors make my computer hang -


the following code makes computer hang time:

object application extends app {   val system = actorsystem()   val supervisor = system.actorof(props[supervisor])   implicit val timeout = timeout(10 seconds)    import system.dispatcher    val future = supervisor ? supervisor.start   val idlist = await.result(future, timeout.duration).asinstanceof[list[myclass]]   supervisor ! idlist } 

it causes exception of timeout later when barely responds. previously, when code didn't use actors, worked fine.

i can't post of because there lot of it. code have post?

update:

how find out problem is?

looks not terminating actorsystem , hence application not terminate. @ end need call system.shutdown shutdown actorsystem.

internally actorsystem manages threads needs terminated application terminate. shutdown terminates them. not calling prevent application shutting down threads still alive.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -