An easyful thread runner
Project description
TMKTProcess
How to install it
pip install tmktprocess
How to import it
from tmktprocess import Process
How to use it
def my_func(*args, **kwargs):
# do some stuff
pass
To start your process you have to do this:
process = Process(my_func)
process.start(my_args, my_kwargs)
result = process.join()
The .start() will call your function and pass the args and kwargs, then the result will be return with the .join() method
Use with Event
You can also pass an Event from
threading
package in init call.
from threading import Event
my_event = Event()
process = Process(my_func, my_event)
When the method will end, the event will be set
You can use it for everything you want
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
tmktprocess-1.0.2.tar.gz
(6.1 kB
view hashes)
Built Distribution
Close
Hashes for tmktprocess-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38dbfd3815f9c180b59ab551e82be7ef07da4ab64172414a4e1e27834f726aaa |
|
MD5 | b003044fb0cb6ec9e9719fb9643f7c89 |
|
BLAKE2b-256 | cdb1c716c4775bb9d1c76517f89b776f3f80f90d8a3fac8834a25237ab8de68a |