3 ms·
re 1) good point, didn't think of that re 2) the fork global lock satisfies every requirement for a multiple-readers/single-writer, with fork() being the only
by datenwolf 10y ago
re 1) good point, didn't think of that
re 2) the fork global lock satisfies every requirement for a multiple-readers/single-writer, with fork() being the only writer. Unless the program does a lot of fork()-ing it should hardly ever run into contention. The moment fork() waits on the lock, further attempts on read-lock are delayed until after fork() completes and the existing reads are waited for, before fork()-ing.