[concurrency-interest] cancelling future

Christopher Kin Chung Au cau at aspecthuntley.com.au
Thu Mar 9 16:31:43 EST 2006


Managed to get the canceling working. I do not think it is the most
elegant way of doing things but it bloody works.

The way I attempted this was that I already kept references of all the
future email processes and just used the drainTo Method to remove them.

Anyway thanks to all who helped.


-----Original Message-----
From: studdugie [mailto:studdugie at gmail.com] 
Sent: Friday, 10 March 2006 12:33 AM
To: Christopher Kin Chung Au
Subject: Re: [concurrency-interest] cancelling future

I hesitate to respond to your post in large part because I can't
answer your question about the cascading canceling of Future objects
but I plow ahead anyway because I'm solving the exact same problem
(bulk email) except I've approached it from a completely different
angle than Executors and Futures. So before I waste any of your or my
time rattling on about what I'm doing I'll leave it here and you can
reply to this post if you are interested in my approach. Otherwise
good luck to you.


On 2/28/06, Christopher Kin Chung Au <cau at aspecthuntley.com.au> wrote:
> Hi,
> Currently I have an application which sends out bulk email we use the
> ExecutorService submit to get a future object back which we store.
> future object holds many other future objects which are the actual
> that send out the email. The intention is that we will potentially
have many
> bulk email future objects which in turn hold many email future objects
> sending out the emails. We want to be able to choose and cancel a
> bulk email future object which in turn stops all the email future
> associated with that bulk email future object while the other bulk
> future objects remain intact. I have used the cancel command but
whilst the
> bulk email future object reports that it has been cancelled the email
> objects seem to continue to run. I hope this makes sense and any help
> be appreciated.
> Thanks
> Chris
> PS the email future objects are created using executorservice.submit.
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at altair.cs.oswego.edu
> http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest

More information about the Concurrency-interest mailing list