These are chat archives for petabridge/akka-bootcamp

Oct 2016
Gregorius Soedharmo
Oct 19 2016 12:13
dunno how you do it in f#, what i did in mine is var task = myActorSystem.Terminate(); Task.Waitall(task)
Daniel Santa Cruz
Oct 19 2016 14:06
@Arkatufus thanks!
Also, I see that AwaitTermination has been deprecated. What's the new alternative?
is it to do something like myActorSystem.WhenTerminated |> Task.WaitAll?
Or is there a different approach?
Gregorius Soedharmo
Oct 19 2016 14:10
I think that Terminate() is an async function, doing the WaitAll() just blocks the code execution until Terminate() is done with what it is doing, so in essence it is doing what AwaitTermination is doing?
Marc Piechura
Oct 19 2016 14:34
Terminate returns the WhenTerminated task internally, so you can either call Terminate().Wait directly or if you need to wait in a different place you can use WhenTerminated.Wait()
Gregorius Soedharmo
Oct 19 2016 14:43
i'm a bit perplexed here... i'm trying to use the Ask() pattern, webAPI calls var result = await actorA.Ask(request);, after actorA's done with its job, it passes the job over to ActorB using ActorB.tell(jobresult, Sender);, and after ActorB finished successfully, it calls Sender.Tell(finalResult);, but finalResult always ends up in the unhandled message pile...
oh wait, let me ask in instead...