New submission from Joshua Harlow:

When a future can't be accepted by an executor that it is has been submitted to 
it would be really nice to throw have a type of 'RejectedExecutionException' 
(this is the name the java folks have used) to denote that the executors policy 
does not allow for further execution.

Some of the reasons that further execution could be rejected (an arbitrary 
executor policy would be really neat).

- Backlog of work to be done has reached a configurable threshold.
- Resource limits reached (in concept similar to a 503 HTTP error code), come 
back later...

This would be a great addition to allow for executor usage that does not cause 
resource starvation (currently executors have unbounded work queues, which is 
undesirable under load where a rejected execution error would be more 
appropriate to avoid more starvation...)

----------
components: Library (Lib)
messages: 230058
nosy: Joshua.Harlow
priority: normal
severity: normal
status: open
title: Provide a rejected execution model and implementations for futures.
type: enhancement
versions: Python 3.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22737>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to