This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Provide a rejected execution model and implementations for futures.
Type: enhancement Stage: needs patch
Components: Library (Lib) Versions: Python 3.5
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Joshua.Harlow, bquinlan, sileht, vstinner
Priority: normal Keywords:

Created on 2014-10-27 02:38 by Joshua.Harlow, last changed 2022-04-11 14:58 by admin.

Messages (1)
msg230058 - (view) Author: Joshua Harlow (Joshua.Harlow) Date: 2014-10-27 02:38
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...)
History
Date User Action Args
2022-04-11 14:58:09adminsetgithub: 66926
2015-07-24 12:43:45silehtsetnosy: + sileht
2014-10-31 23:07:29terry.reedysetstage: needs patch
versions: + Python 3.5, - Python 3.6
2014-10-27 14:36:07vstinnersetnosy: + vstinner
2014-10-27 02:56:57ned.deilysetnosy: + bquinlan
2014-10-27 02:38:59Joshua.Harlowcreate