
Ben Rudiak-Gould
writes: is there *any* way to get, without an exploitable race condition, two filehandles to the same file which don't share a file pointer?
In unix the traditional way to do this is to use a directory. Each
Marcin 'Qrczak' Kowalczyk wrote: process/thread opens its own file... and you have some kind of master index/ordering file to keep track of which file is doing what (for example Highly parallel mail software). At the end of the day IO is serial by nature (to one device anyway), so the way to do this into one file is to have one thread that reads and writes, and to 'send' read and write requests over channels from the threads that need the work done... Effectively the channels serialise the requests. This has the added advantage that is guarantees the transactional itegrity of the IO (for example database software) Keean.