Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit 41138062 authored by Gustavo Pinzon's avatar Gustavo Pinzon
Browse files

Solved the problem with coverage and multiprocessing

parent c387f94b
Pipeline #50666 passed with stages
in 23 minutes and 43 seconds
......@@ -1702,7 +1702,7 @@ def moveLabels(lab, PhiField, boundingBoxes=None, centresOfMass=None, margin=3,
"""
# Define worker for multiprocessing
def work_on_one_job(worker_number, q_jobs, q_results):
def worker(worker_number, q_jobs, q_results):
while True:
job = q_jobs.get()
......@@ -1802,7 +1802,7 @@ def moveLabels(lab, PhiField, boundingBoxes=None, centresOfMass=None, margin=3,
for i in range(numberOfThreads): q_jobs.put("STOP")
# Launching workers
for i in range(numberOfThreads):
p = multiprocessing.Process( target=work_on_one_job, args=(i, q_jobs, q_results,))
p = multiprocessing.Process( target=worker, args=(i, q_jobs, q_results,))
p.start()
finished_threads = 0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment