Skip to main content

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


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)

Uploaded Source

Built Distribution

tmktprocess-1.0.2-py3-none-any.whl (6.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page