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!

like the standard threading module, but awesomer

Project Description

threading2: like the standard threading module, but awesomer.

This module is designed as a drop-in replacement and extension for the default “threading” module. It has two main objectives:

  • implement primitives using native platform functionality where possible
  • expose more sophisticated functionality where it can be done uniformly

The following extensions are currently implemented:

  • ability to set (advisory) thread priority
  • ability to set (advisory) CPU affinity at thread and process level
  • thread groups for simultaneous management of multiple threads
  • SHLock class for shared/exclusive (also known as read/write) locks

The following API niceties are also included:

  • all blocking methods take a “timeout” argument and return a success code
  • all exposed objects are actual classes and can be safely subclassed

This has currently only been tested on WinXP and Ubuntu Karmic; similar platforms should work OK, and other platforms should fall back to using sensible default behaviour, but I’m not making any guarantees at this stage.

Additional planned extensions include:

  • make stack_size a kwarg when creating a thread
  • native events, semaphores and timed waits on win32
  • native conditions and timed waits on pthreads platforms
  • native SHLock implementations (SRW on Win Vista+, pthread_rwlock)
Release History

Release History

This version
History Node

0.3.1

History Node

0.2.1

History Node

0.2.0

History Node

0.1.4

History Node

0.1.3

History Node

0.1.2

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
threading2-0.3.1.tar.gz (20.0 kB) Copy SHA256 Checksum SHA256 Source May 6, 2014

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