Use an internal thread concurrency model
commit4b9923658902962974002b5bce6bb395c161a73d
authorGuilhem Bonnefille <guilhem.bonnefille@gmail.com>
Sat, 24 Oct 2009 19:57:19 +0000 (24 21:57 +0200)
committerGuilhem Bonnefille <guilhem.bonnefille@gmail.com>
Sat, 24 Oct 2009 19:57:19 +0000 (24 21:57 +0200)
treec73ae96d768929d3bc6a30559664451f336a1a0a
parent245f48f5ffbeeade1249f4aee3be08bd0ee18766
Use an internal thread concurrency model

Previous model was based on file: an existing *.tmp file signify a thread is downloading.
This model is not error prone: when viking failed to remove such a file (core dump?),
it won't be able to download this tile in the future.

Now, the concurrency between threads is handle internally: a list contains
all tmp files currently in use. By this way, thread exclude each other and
locks are clean at start.

Drawback: this model does not allow concurrency between multiple instance
of viking.
src/download.c
src/download.h
src/main.c