Why?
Easier to read and use than the asyncio syntax.
Instead of async for ... we just use for loops
Instead of async with semaphore we just use with semaphore
Instead of await function() we just call the function
Instead of asyncio.create_task(func) we just submit a new function call to the executor, which will only leave the with statement when all tasks are completed.
Should be easier to test/mock functions
Affected folders: https://github.com/BurnySc2/monorepo/tree/develop/transcribe_website/transcriber_backend
Idea: https://docs.python.org/3/library/concurrent.futures.html#threadpoolexecutor https://github.com/BurnySc2/monorepo/blob/daab0f49399bd98bb8ea9b1a15877dcf4b7703fb/python_examples/examples/other/multithreading_example_02.py
Why? Easier to read and use than the asyncio syntax. Instead of
async for ...
we just use for loops Instead ofasync with semaphore
we just usewith semaphore
Instead ofawait function()
we just call the function Instead ofasyncio.create_task(func)
we just submit a new function call to the executor, which will only leave thewith
statement when all tasks are completed. Should be easier to test/mock functions