Idea for Threads
Craig Black
cblack at ara.com
Mon May 14 12:31:22 PDT 2007
> One of the problems is memory corruption because reading is done when a
> write is in progress. > This can be avoided by the use of mutexes.
I was thinking about this. An efficient mutex implementation should take
into consideration read and write access. If there is a write, then all
access to the data should be prohibited until the write is completed.
However, any number of reads should be able to work together in parallel.
If a read is treaded the same as a write, then that would be very
inefficient.
I don't know a lot about the details of mutexes. Do they multiple reads
simultaneously?
-Craig
More information about the Digitalmars-d
mailing list