These are chat archives for petabridge/akka-bootcamp

3rd
Feb 2016
Koen Metsu
@koenmetsu
Feb 03 2016 06:16
Hi, first of all, thanks for the great bootcamp!
secondly, can anyone successfully use the scheduler with cancellables?
let cancellable = Akka.Actor.Cancelable.CreateCanceled()
mailbox.Context
        .System
        .Scheduler
        .ScheduleTellRepeatedly(TimeSpan.FromMinutes 0.,
                                TimeSpan.FromSeconds 5.,
                                mailbox.Self,
                                message,
                                mailbox.Self,
                                cancellable)
does not seem to work
while this does
mailbox.Context
    .System
    .Scheduler
    .ScheduleTellRepeatedly(TimeSpan.FromMinutes 0.,
                            TimeSpan.FromSeconds 5.,
                            mailbox.Self,
                            message)
Koen Metsu
@koenmetsu
Feb 03 2016 06:26
ie: the message does not get sent with the first piece of code.
anything obvious I'm missing?
John Nicholas
@MrTortoise
Feb 03 2016 14:01
havent really looked closley but why are you using mailbox.self? Arn't those arguments expecting a reference to the actor?
oh scratch that mailbox is an actor
yeah why cant you just use mailbox instead of mailbox.Self
Bartosz Sypytkowski
@Horusiath
Feb 03 2016 14:16
@MrTortoise this is F# code ;)
John Nicholas
@MrTortoise
Feb 03 2016 14:22
oooh
the let shuold of been the clue ;p
Koen Metsu
@koenmetsu
Feb 03 2016 15:39
yeah, it's F# :)
Bartosz Sypytkowski
@Horusiath
Feb 03 2016 16:42
@koenmetsu you have version of Schedule, which returns cancellable instead