These are chat archives for petabridge/akka-bootcamp

14th
Mar 2015
Aaron Stannard
@Aaronontheweb
Mar 14 2015 00:03
the CancellationTokenSource doesn't have to be created in PreStart
it's a low-risk operation
creating a PerformanceCounter is a bit riskier though, so I do that in PreStart just so the failure doesn't happen in the constructor
for things like creating a MemoryStream or a CancellationTokenSource you can probably do it in either place
but for something like opening a DB connection or something that's platform-sensitive like a PerformanceCounter
do that in PreStart so the failures happen through the normal actor lifecycle
general good practice to keep risky stuff out of the constructor
Jorge Fioranelli
@jorgef
Mar 14 2015 08:45
@Aaronontheweb thx