I know that there is a GIL in python that forces threads to execute on only 1 core. But I created processes by the number of processor cores, and in each process I create threads. In theory, will they be executed in parallel in each process? And if it works, how can I synchronize everything while using Pool
from multiprocessing import Pool
from concurrent.futures import ThreadPoolExecutor
def make_threads(data):
with ThreadPoolExecutor(len(data)) as executor:
answer=list(executor.map(some_function,data))
return answer
def main():
with Pool(processes_count) as p:
answer=list(p.map(make_threads,data))```