Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Threadpool library for humans.

Project Description

Thread pool library for Humans.

Installation

Using pip

pip install SimplePool

or to get the source via pip, use

pip install -e git+https://github.com/srirams6/py-threadpool.git#egg=SimplePool

From source

  • Clone from Github.
  • Execute python setup.py install

Usage

Basic usage is shown here.

import SimplePool

# Function to be executed.
def printer(x, y, testx=None, testy=None):
    print x, y, testx, testy
    print "Done"

t = SimplePool.ThreadPool()

# Adding the same function 100 times
for i in range(100):
    args = ('formalx', 'formaly')
    kwargs = {'testx': 'keywordx', 'testy': 'keywordy'}
    j = SimplePool.ThreadJob(printer, args, kwargs)  # Create a thread_job object.
    t.add_job(j)
t.start()
t.finish()

Contribute

If you want to add features, or improve anything feel free to send a pull request. If you have any issues, open an issue.

Todo

  • Putting results in result_q and handling the results
  • Handling exceptions in the function call
Release History

Release History

This version
History Node

0.1

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
SimplePool-0.1.tar.gz (36.4 kB) Copy SHA256 Checksum SHA256 Source Apr 7, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting