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!

Supercharged threads

Project Description

Supercharged (sensible) execption propogating and lightweight wrapper around the standard library Thread. Basically ensures that you don’t have to perform cartwheels just to ensure that the execution of your threaded tests/programs do not fail behind your back with some exception. Usage example:

>>> from exthread import ExThread
>>> def task():
        arr = [1,2,3]
        arr[4]

>>> t = ExThread(task)
>>> t.start()
>>> t.join()
Traceback (most recent call last):
    ...
IndexError: ...

The API is deliciously simple:

>>> def task(a, b=1):
        return [a, b]

>>> t = ExThread(task, (1,), dict(b=2))
>>> t.start()
>>> t.join()
[1, 2]
>>> assert t.err is None
>>> assert t.val == [1, 2]

You don’t really need it. But you want it.

Release History

Release History

This version
History Node

0.1.1

History Node

0.1.0

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
exthread-0.1.1.tar.gz (2.5 kB) Copy SHA256 Checksum SHA256 Source Nov 2, 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