X-Git-Url: https://wannabe.guru.org/gitweb/?a=blobdiff_plain;f=parallelize.py;h=77d7649fe956a1542c1a60ce99ca96365ef59ce0;hb=47ece7bceb442d70ddcc3c728533c4d4d2bccde4;hp=cd3eff4e9c539c25d7d5cf3deb52a494bd2bd0f0;hpb=435701f95aed73615a192c1e35c99df679817105;p=python_utils.git diff --git a/parallelize.py b/parallelize.py index cd3eff4..77d7649 100644 --- a/parallelize.py +++ b/parallelize.py @@ -1,15 +1,19 @@ #!/usr/bin/env python3 +# © Copyright 2021-2022, Scott Gasch + """A decorator to help with dead simple parallelization.""" import atexit -from enum import Enum import functools import typing +from enum import Enum class Method(Enum): + """How should we parallelize; by threads, processes or remote workers?""" + THREAD = 1 PROCESS = 2 REMOTE = 3