Unreleased Release Notes¶
3.4.0-3¶
New Features¶
Adds
DelayedExecutorMixinandGreenDelayedExecutorMixinmixin classes that extend anyExecutorsubclass with asubmit_after(delay, fn, *args, **kwargs)method.A single background scheduler thread maintains a min-heap of pending tasks ordered by their deadline. When a task’s deadline arrives the scheduler submits it to the underlying executor. Tasks can be cancelled while waiting for their deadline via the returned
Future.Use
DelayedExecutorMixinwith native-thread executors (e.g.ThreadPoolExecutor) andGreenDelayedExecutorMixinwith eventlet-based executors (e.g.GreenThreadPoolExecutor). Eachsubmit_aftercall accepts its own delay value, so different tasks submitted to the same executor can have different delays.Example:
class DelayedThreadExecutor( futurist.DelayedExecutorMixin, futurist.ThreadPoolExecutor, ): pass executor = DelayedThreadExecutor(max_workers=4) fut = executor.submit_after(0.5, my_func, arg1, kwarg=val) result = fut.result() executor.shutdown()
3.4.0¶
New Features¶
The
ProcessPoolExecutorclass now accepts themp_context. Refer to docs forconcurrent.futures.ProcessPoolExectorfor more information.
Upgrade Notes¶
Support for Python 3.10 has been dropped. The minimum version of Python now supported is 3.11.
3.3.0¶
Upgrade Notes¶
Support for Python 3.9 has been removed. Now the minimum python version supported is 3.10.
3.2.1¶
Bug Fixes¶
shutdown(wait=True)abandoned queued work. This fix ensures it blocks until all submitted tasks (running and queued) finishes, consistent with Python’s concurrent.futures.ThreadPoolExecutor
3.2.0¶
New Features¶
Adds a new
DynamicThreadPoolExecutorthat can resize (grow or shrink) its pool based on demand. As new work is scheduled on the executor, it will try to keep the proportion of busy threads within the provided range (between 40% and 80% by default).The motivation is to provide a scalable alternative to
GreenThreadPoolExecutor.
3.1.0¶
Upgrade Notes¶
Support for Python 3.8 has been removed. Now the minimum python version supported is 3.9 .
Deprecation Notes¶
Eventlet usages are deprecated and the removal of Eventlet from OpenStack is planned, for this reason the executors based on Eventlet are deprecated. Start migrating your stack to the threading executor. Please also start considering removing your internal Eventlet usages.