I am running Scala Play 2.2.2 as the front end of for Java library. Certain calls into the java library are extremely long running (order of hours). I am looking for some mechanism to be able to run these calls asynchronously but to also be able to cancel them once they have started, essentially killing the thread that is running them. Akka actors don't seem to fit the bill as as soon as I make the service call, the actor mailbox queue will block until the call is over leaving it unresponsive to Kill messages. I have been looking for an implementation of cancellable futures, but have not found anything that will deterministically kill the Future.
The closest that I have come is a gist written by Viktor some time ago (https://gist.github.com/viktorklang/5409467) but I am unable to figure out how to use it correctly. The (Future[A] -> A) in the type is completely throwing me off and I have no idea how to pass in my actual workload. Can anyone offer any advice for this situation? I would prefer to be able to use some kind of high level primitive rather than having to fall back to using Callable[T]. -- >>>>>>>>>> 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.