Concurrent prototype » History » Revision 3
Revision 2 (Greg Burri, 07/03/2009 01:43 PM) → Revision 3/4 (Greg Burri, 07/07/2009 10:52 PM)
h1. Concurrent prototype
h2. Goals
* Define a strategy to read and to write the same file from different threads.
* Test by creating many thread which will write and read in the same time the same file.
h2. Description
When a download starts the corresponding file with the final size is created. The file will be filled from different thread during the downloading. Each thread take a part of the file.
h2. Solution
Two descriptor are opened per file. One for write operations and an another for those of writing. Each descriptor is kept by a mutex. There can't be two read or two write in the same time but there can have a read and a write simultaneous. I think there is no gain to read simultaneous from different threads.