qThread
qThread provides an simplified and safe way to stop long running threads. Typical uses often look like this:
# Test / Usage of the stoppable thread
class MyThreadingClass(StoppableThread):
def __init__(self, a):
super(MyThreadingClass, self).__init__()
self.a = a
self.b = "World"
self.delay = .5 # seconds
def startup(self):
# Overload the startup function
print "My Thread Starting Up..."
def cleanup(self):
# Overload the cleanup function
print "My Thread Is Shutting Down..."
# Close files, ports, etc...
time.sleep(4)
print "Cleanup Complete!"
def mainloop(self):
# Some routine to be called over and over
# ie: reading ports or sockets
print self.a + " " + self.b
# Throttling needs to be done here if the
# primary function is not blocking
time.sleep(self.delay)
Metadata
Release files for qThread 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| qThread-0.1.0.tar.gz | 2.6 kB | Without provenance | Details for qThread-0.1.0.tar.gz |
Release files / qThread-0.1.0.tar.gz
| Download URL | qThread-0.1.0.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e68bcae9c4a1805cf0b82c26b41acaf6f59dda5c5f9f51210b5e9a04af91e5af
|
|
BLAKE2b-256 checksum How to use checksums |
4a5c55b69294eab63a7713c07d432b813f6091f0723d8277783439454739cd14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for qThread 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.