AshGw / parallelexec

Module providing convenient decorators for fearless concurrency

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Parallelexec

Parallelexec is a Python module that provides decorators and methods to easily run multiple functions concurrently.

Installation

Use pip

pip install parallelexec

Usage

Threads:

from parallelexec import ParallelExec

@ParallelExec.thread(join=True)
def fun():
    ...

Processes:

from parallelexec import ParallelExec

def func() -> None: ...
def func2() -> None: ...
def func3() -> None: ...

if __name__ == "__main__":
    ParallelExec.cores_limited_processor([func,func2,func3])

Better yet, check examples/

License

This is under the Public Domain

About

Module providing convenient decorators for fearless concurrency

License:The Unlicense


Languages

Language:Python 100.0%