I'm researching about parallel execution in Python and I was left with a question that I have not found a clear answer yet.
Let's say I want to multiply two arrays and add in a task list where each task is a row of array A and a column of array B and ask that% of threads remove from this list one task to multiply.
I have 4 colors on the machine, using the n
module of Python, if I create 4 theads to execute the task list, those threads will be executed one in each core ? That is, in parallel? Or would I need to use the threading.Thread
module that divides tasks into 1 process for each core ?
If only with multiprocessing
I can distribute the tasks in 4 colors , how do I define 2 threads in each process, ie each > core would receive 2 threads to process my task?