Don't rush into rewriting your code in a concurrent fashion just yet. There are plenty of reasons not to write concurrent code. Let's look at a few reasons here:
- First of all, don't do it if you don't need that boost—any type of concurrency adds code complexity and makes debugging exponentially harder.
- Second, the code for many specific computation-demanding tasks is already written. For example, multiple sklearn models support multicore execution—you just need to specify the number of CPUs to use. Some solutions, such as Numba, can release the GIL for specific operations, without large code changes being made.
- Some important packages do not support concurrent operations—asynchronous execution in particular ...