Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
With [autothread](https://github.com/Basdbruijne/autothread) you can add threading/multiprocessing to your functions by just adding a single decorator. When you call your function with a list, autothread will use the type hinting of your function to determine how to split your arguments over multiple threads/processes. All the threading/multiprocessing complications, error handing, etc are handled by autothread and you get a list back with the outputs of each of the threads.
Oh cool, I missed that one when I did my initial research. I did come across multitasking, which is also similar but doesn't make it easy to return objects from the function.
Highly recommend you read this code https://github.com/django/django/blob/0dd29209091280ccf34e07c9468746c396b7778e/django/contrib/auth/decorators.py