Skip to main content

Simple thread module to repetitively perform a task on a single thread

Project description

Python thread module to repeat an predefined task on a thread mulitple times. A TaskThread is useful when a task needs to be repeated several times on a separate thread. Normal usage of the threading.Thread class would call for creation of a new thread each time the same task needs to be run. This module allows for repetitive tasks to be run multiple times on the same thread by having the thread wait until the task needs to be executed again.

Provided Classes

taskthread.TaskThread`

A sub-class of threading.Thread that may execute a single task multiple times without the overhead of starting a new thread.

taskthread.TaskInProcessException

Exception that is thrown if a task is started on a thread that is already executing.

Installation

taskthread may be installed by executing pip install taskthread.

Changes

v1.4

  • ADD TimerTask class that runs a repetitive task on a taskthread.

v1.3

  • Change task loop to support python 2.6.

v1.2

  • Refactor the module so classes are defined in __init__.py.

v1.1

  • ADD TaskThread.join_task method that waits for the currently executing. task to complete.

v1.0

  • First release

Project details


Download files

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

Source Distribution

taskthread-1.4.tar.gz (15.1 kB view details)

Uploaded Source

File details

Details for the file taskthread-1.4.tar.gz.

File metadata

  • Download URL: taskthread-1.4.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for taskthread-1.4.tar.gz
Algorithm Hash digest
SHA256 626c17c611189ac541051d44f6c0f01d47eefc6622d1d7877832b2add06685f1
MD5 ab61ce3cefd099a39646b9aaae341082
BLAKE2b-256 1cfc63f80ef28195b8a6b5b7254bd2681f68d3ea426e6bda13e782beea43ac93

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