Re: ThreadPoolExecutor - cancel rej ected tasks with Discard*Policy?

Petr Janeček via Concurrency-interest <[email protected]>
Newsgroups gmane.comp.java.jsr.166-concurrency
Message-ID <F9.1QE4.6cY}[email protected]>
> From: Doug Lea <[email protected]>
> Datum: 16. 2. 2020 15:43:13
> 
> Subject: Re: [concurrency-interest] ThreadPoolExecutor - cancel rejected tasks with Discard*Policy?
> 
> [...] Probably we'll just add documentation. See the draft embedded example at:
> http://gee.cs.oswego.edu/dl/jsr166/dist/docs/java.base/java/util/concurrent/ThreadPoolExecutor.DiscardOldestPolicy.html
> 
> Plus a few added sentences in TPE documentation
> http://gee.cs.oswego.edu/dl/jsr166/dist/docs/java.base/java/util/concurrent/ThreadPoolExecutor.html

Thank you, that's very clear.
I would personally like a new policy, too, but I admit its usage is probably
obscure enough that it would not hold its own weight.
 
> We could add @Deprecated(forRemoval=false), but I'm not sure how much
> this would help. There are a few legitimate uses for it, and that code
> would now encounter warnings.

Agreed, I subjectively do not think @Deprecated is warranted in this case.

PJ
_______________________________________________
Concurrency-interest mailing list
[email protected]
http://cs.oswego.edu/mailman/listinfo/concurrency-interest
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.