Useful module for comfortable managing with threading.
Project description
pythread - Useful module for comfortable managing with threading.
-How to use-
import pythread as pt
def func(a, b):
print(a, b)
t = pt.createThread('NameOfThread', func, 5, 'a', 'b') #NameOfThread - name of thread, func - function, 5 - delay of run function, 'a', and 'b' arguments of function
t.start() #start the thread
pt.stopThread('NameOfThread') #stop thread by name
pt.stopThread(t) #stop thread by thread
t = ptr.getThreadByName('NameOfThread') #select thread by name
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pythread-1.1.1.tar.gz
(2.5 kB
view hashes)