logo separator

[mkgmap-dev] Splitter hangs when processing pbf with 1 thread only

From RNDr. Frantisek Mantlik frantisek at mantlik.cz on Wed Mar 2 14:18:55 GMT 2011

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 




More information about the mkgmap-dev mailing list