Skip to content

Commit

Permalink
add not implemented error for broken multiprocessing code
Browse files Browse the repository at this point in the history
  • Loading branch information
nreinicke committed Jul 22, 2024
1 parent cf06b88 commit 4728427
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions mappymatch/matchers/lcss/lcss.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import functools as ft
import logging
from multiprocessing import Pool

from shapely.geometry import Point

Expand Down Expand Up @@ -155,7 +154,11 @@ def match_trace_batch(
if processes <= 1:
results = [self.match_trace(t) for t in trace_batch]
else:
with Pool(processes=processes) as p:
results = p.map(self.match_trace, trace_batch)
raise NotImplementedError(
"Using `processes>1` is not available due to a known issue with rtree serialization."
"See https://github.com/Toblerity/rtree/issues/87 for more information."
)
# with Pool(processes=processes) as p:
# results = p.map(self.match_trace, trace_batch)

return results

0 comments on commit 4728427

Please sign in to comment.