Skip to main content

A simple threadpool utility

Project description

SimpleThreads - A simple thread pool utility
A simple thread pool for python 2.x+<br/>
If you are missing ThreadPoolExecutor in python 2.x, here is a simple thread pool manager.


pip install simplethreads


- Define tasks

def task_a():
# do something

def task_b(a,b,c):
# do something more

- Create a thread pool to schedule your tasks.

from simplethreads.ThreadPool import ThreadPool

# Create thread pool with nums threads
pool = ThreadPool(nums)

# Add a task into pool

# Pass arguments to task

# Cleanup before exit
# default value of block=True
# set to false if you dont want to wait till all the tasks are processed
# (Tasks will be processed in background though!)

Project details

Download files

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

Files for SimpleThreads, version 1.2
Filename, size File type Python version Upload date Hashes
Filename, size SimpleThreads-1.2.tar.gz (2.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page