Features

Async

Delayed Execution

  • A futurist.DelayedExecutorMixin that can be combined with any Executor subclass to add a submit_after(delay, fn, *args, **kwargs) method. A single background scheduler thread maintains a min-heap of pending tasks ordered by deadline; tasks can be cancelled while waiting via the returned Future. Use futurist.GreenDelayedExecutorMixin when working with eventlet- based executors.

Periodics

  • A futurist.periodics.PeriodicWorker that can use the previously mentioned executors to run asynchronous work periodically in parallel or synchronously. It does this by executing arbitrary functions/methods that have been decorated with the futurist.periodics.periodic() decorator according to a internally maintained schedule (which itself is based on the heap algorithm).