Hello,

I have a job that's scheduled with Scheduler and I save the Cancellable. 
 The job isn't important, but it just sends a message to an Actor.
After scheduling, it runs for a while and at some point I call cancel() on 
the Cancellable and need to ensure the job is actually done and won't fire 
again before continuing.

What I'm finding is that cancel() on the Cancellable returns immediately 
and even looping/pausing on isCancelled doesn't ensure the job won't 
fire a few more times before finally stopping.  (It runs once a second for 
my test purposes.)

Is there a way I can ensure my cancelled job is completely done, never to 
fire again, before proceeding?

(Nothing special, but code that schedules the job below):

scheduledServices.put(
svc.serviceId,
server.system.scheduler.schedule( 5 seconds, 5 seconds, myActor, 
ExecuteTest(svc) )
)

Thanks,
Greg

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to