logo separator

[mkgmap-dev] Splitter issue

From Scott Crosby scott at sacrosby.com on Tue Feb 22 01:29:44 GMT 2011

On Mon, Feb 21, 2011 at 5:06 PM, Steve Ratcliffe <steve at parabola.me.uk> wrote:
> Hi Scott
>> What approach are you thinking of?
>> One constraint in my design is that I didn't want to have one thread
>> for each output file because there could be>5000 output files.
> This thing that I don't like is that the InputQueueInfo's submit
> themselves onto a queue and that they can add themselves more than once,
> and that more items can be added while the work batches are being processed.
> So two threads could pick up the same work unit, and although the
> synchronized block should stop them interfering, one thread is blocked
> doing nothing when this happens, potentially for a long time.

Yes. that part was by design-- I don't want two threads processing two
workunits to the same output output at the same time, that way I avoid
the need for synchronization during the lower-level serialization
code. The code is crufty --- I was adapting the old design and didn't
really have time to do a new clean design.

What approach are you thinking of?


More information about the mkgmap-dev mailing list