Skip to main content

Simple threadpool executor without futures

Project description

classic-thread-pool-executor

Библиотека дает простой класс Executor для исполнения задач в порядке очереди.

Для использования необходимо передать количество worker-ов.

Для добавления callback-ов используется метод .submit(). В него следует передать callback. Callback будет вызван когда подойдёт его очередь.

Методом .stop() можно остановить работу исполнителя.

Например:

from classic.executor import Executor

executor = Executor(workers_num=1)

def some_task():
    print('Hello, world!')

executor.submit(some_task)
executor.stop(block=True) # Дожидается остановки

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

classic_thread_pool_executor-1.1.1.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

classic_thread_pool_executor-1.1.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file classic_thread_pool_executor-1.1.1.tar.gz.

File metadata

File hashes

Hashes for classic_thread_pool_executor-1.1.1.tar.gz
Algorithm Hash digest
SHA256 fec271bc499c5b19e8119c59287cdb73eb4be73c131b0334c9ef80bf8f401a78
MD5 9053c75539182c7d44ffd9bcf7ca6603
BLAKE2b-256 65d96a4c6a4cd5b9464e464a7593a23524452817ec2ed3087445f4587dbf7000

See more details on using hashes here.

Provenance

The following attestation bundles were made for classic_thread_pool_executor-1.1.1.tar.gz:

Publisher: publish.yml on variasov/classic-thread-pool-executor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file classic_thread_pool_executor-1.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for classic_thread_pool_executor-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2e44ba181aeca57deb089d1698494e261377f095a23a8f1f5dac6a0dfb0e79ae
MD5 6b005b4d41972a10fbb7e1de0af93ddf
BLAKE2b-256 7168d2fb5b119ba582b0f8bdf015d27bcd4c31620d7083c785e31079f7d3feef

See more details on using hashes here.

Provenance

The following attestation bundles were made for classic_thread_pool_executor-1.1.1-py3-none-any.whl:

Publisher: publish.yml on variasov/classic-thread-pool-executor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page