Metadata-Version: 2.1
Name: timeoutthreadpoolexecutor
Version: 1.0.2
Summary: A backported ThreadPoolExecutor with thread TTL
Home-page: https://github.com/JohnDoee/timeoutthreadpoolexecutor
Author: Anders Jensen
Author-email: andersandjensen@gmail.com
License: MIT
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Python Software Foundation License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Topic :: Software Development :: Libraries :: Python Modules

TimeoutThreadPoolExecutor
============================

This library tries to solve my issue with 1000+ idle threads in Python 3.7 by using a backported
ThreadPoolExecutor (with thread reuse) and giving threads a TTL.

There is probably no reason to use this for short-lived threads.


Usage
-----

There are two ways to use this library, overwrite the default TheadPoolExecutor or use it directly.

To overwrite the default, do this as the first thing before any other thing your project does.

.. code-block:: python

    from timeoutthreadpoolexecutor import TimeoutThreadPoolExecutor
    from concurrent.futures import thread
    thread.ThreadPoolExecutor = TimeoutThreadPoolExecutor

or

.. code-block:: python

    from timeoutthreadpoolexecutor import TimeoutThreadPoolExecutor as ThreadPoolExecutor



License
-------

Same as Python, I guess.

