How can I achieve a synchronization structure like that:
Lock.BeginRead
try
if Changed then
begin
Lock.BeginWrite;
try
Update;
finally
Lock.EndWrite;
end;
// ... do some other stuff ...
end;
finally
Lock.EndRead;
end;
without loosing the read lock after the EndWrite, so that no other writers can execute while this code block is executed.
How does Delphi 2009's TMuliReadExclusiveWriteSynchronizer behave in this case?