Splitter hangs when processing pbf with 1 thread only

When processing pbf file with splitter on single processor computer, processing never finishes. If my guess is correct, the problem is in the endMap function of the SplitProcessor class. Process hangs on line 176 because of blocking of the toProcess queue. The queue is not processed with the inner OSMWriterWorker class. Proposed solution which works for me is (patched to current trunk, i.e. rev. 167): Index: SplitProcessor.java --- SplitProcessor.java Base (BASE) +++ SplitProcessor.java Locally Modified (Based On LOCAL) @@ -172,7 +172,7 @@ } } try { - toProcess.put(STOP_MSG);// Magic flag used to indicate that all data is done. \ No newline at end of file + if (maxThreads > 1) toProcess.put(STOP_MSG);// Magic flag used to indicate that all data is done. \ No newline at end of file } catch (InterruptedException e1) { e1.printStackTrace(); Frank

On 02/03/11 14:18, RNDr. Frantisek Mantlik wrote:
When processing pbf file with splitter on single processor computer, processing never finishes. If my guess is correct, the problem is in the endMap function of the SplitProcessor class. Process hangs on line 176 because of blocking of the toProcess queue. The queue is not processed with the inner OSMWriterWorker class.
Proposed solution which works for me is (patched to current trunk, i.e. rev. 167):
Thanks for tracking that one down, it being affecting a number of people. The patch is now applied. Best wishes ..Steve
participants (2)
-
RNDr. Frantisek Mantlik
-
Steve Ratcliffe