Skip to main content

Threadpool library for humans.

Project description

Thread pool library for Humans.

Latest Version Build Status Coverage Status

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

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

SimplePool-0.1.tar.gz (36.4 kB view details)

Uploaded Source

File details

Details for the file SimplePool-0.1.tar.gz.

File metadata

  • Download URL: SimplePool-0.1.tar.gz
  • Upload date:
  • Size: 36.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for SimplePool-0.1.tar.gz
Algorithm Hash digest
SHA256 e2ee0993a860c6048611b3e1f3bc6734a77b863df4b456555b90176fc1671bdb
MD5 651a02a72703eb8be5c398e4483a55a3
BLAKE2b-256 5f051caf229f0baccbbc01978b4c77269e602125815403a7fb1079e63b83be05

See more details on using hashes here.

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