[fpc-devel] TMultiReadExclusiveWriteSynchronizer
    Jonas Maebe 
    jonas.maebe at elis.ugent.be
       
    Fri Feb 17 12:58:36 CET 2012
    
    
  
On 16 Feb 2012, at 23:56, David Jenkins wrote:
> Under Delphi if the TMultiReadExclusiveWriteSynchronizer writelock  
> is held a read is not blocked if the ThreadID for the read is the  
> same as the ThreadID for the write.  Under FreePascal if writelock  
> is held the read is always blocked regardless of ThreadID or  
> anything else (implemented in the BeginRead method).
>
> I have some third party code that assumes that  
> TMultiReadExclusiveWriteSynchronizer will work as it does in  
> Delphi.  I am wondering if the freepascal implementation is  
> purposeful (read block even when in same thread is intentional) and  
> I should talk to my third party vendor.  Or if this is something  
> that could/should be addressed in FreePascal.
http://edn.embarcadero.com/article/28258 indicates that promoting read  
locks to write locks should work by design (which the current FPC  
implementation doesn't support either), so it's logical to assume that  
acquiring a read lock while you hold a write lock should also be  
possible. Feel free to file a bug report.
Jonas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20120217/08432c10/attachment.html>
    
    
More information about the fpc-devel
mailing list