Re: [fpc-pascal] TMultiReadExclusiveWriteSynchronizer is wrongly implemented

2009-08-31 Thread Graeme Geldenhuys
Vinzent Höfler wrote: Graeme Geldenhuys grae...@opensoft.homeip.net: I have a corrected TMultiReadExclusiveWriteSynchronizer implementation (don't worry, not based on Delphi implementation) that I can donate to FPC. I hope it isn't based on the Delphi one. Last time I heard the Delphi

Re: [fpc-pascal] TMultiReadExclusiveWriteSynchronizer is wrongly implemented

2009-08-31 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: I just need confirmation that the current implementation in FPC is incorrect though. It's not incorrect, just inefficient. I have to disagree. The currently class name is TMultiReadExclusiveWriteSynchronizer. The currently

Re: [fpc-pascal] TMultiReadExclusiveWriteSynchronizer is wrongly implemented

2009-08-29 Thread Vinzent Höfler
Florian Klaempfl flor...@freepascal.org: If you have a better for unix this will be fine. IIRC it is not easy (if possible after all?) to implement TMultiReadExclusiveWriteSynchronizer for unix systems. It's possible, yes. If it's possible in an efficient way, is another question. Vinzent.

Re: [fpc-pascal] TMultiReadExclusiveWriteSynchronizer is wrongly implemented

2009-08-29 Thread Marco van de Voort
In our previous episode, Florian Klaempfl said: (don't worry, not based on Delphi implementation) that I can donate to FPC. I just need confirmation that the current implementation in FPC is incorrect though. If you have a better for unix this will be fine. IIRC it is not easy (if

Re: [fpc-pascal] TMultiReadExclusiveWriteSynchronizer is wrongly implemented

2009-08-29 Thread Vinzent Höfler
Graeme Geldenhuys grae...@opensoft.homeip.net: I have a corrected TMultiReadExclusiveWriteSynchronizer implementation (don't worry, not based on Delphi implementation) that I can donate to FPC. I hope it isn't based on the Delphi one. Last time I heard the Delphi implementation suffers from

[fpc-pascal] TMultiReadExclusiveWriteSynchronizer is wrongly implemented

2009-08-28 Thread Graeme Geldenhuys
Hi, The current TMultiReadExclusiveWriteSynchronizer as implemented in FPC 2.3.1 is wrong. It use Critical Sections in a standard way which means it blocks all other threads while one thread is doing a Read. This is wrong. It is a MULTI read, SINGLE write synchronizer. So it must only block

Re: [fpc-pascal] TMultiReadExclusiveWriteSynchronizer is wrongly implemented

2009-08-28 Thread Florian Klaempfl
Graeme Geldenhuys schrieb: Hi, The current TMultiReadExclusiveWriteSynchronizer as implemented in FPC 2.3.1 is wrong. It use Critical Sections in a standard way which means it blocks all other threads while one thread is doing a Read. This is wrong. It is a MULTI read, SINGLE write

Re: [fpc-pascal] TMultiReadExclusiveWriteSynchronizer is wrongly implemented

2009-08-28 Thread Jonas Maebe
On 28 Aug 2009, at 10:35, Florian Klaempfl wrote: If you have a better for unix this will be fine. IIRC it is not easy (if possible after all?) to implement TMultiReadExclusiveWriteSynchronizer for unix systems. What's wrong with these routines: pthread_rwlock_init,

Re: [fpc-pascal] TMultiReadExclusiveWriteSynchronizer is wrongly implemented

2009-08-28 Thread Florian Klaempfl
Jonas Maebe schrieb: On 28 Aug 2009, at 10:35, Florian Klaempfl wrote: If you have a better for unix this will be fine. IIRC it is not easy (if possible after all?) to implement TMultiReadExclusiveWriteSynchronizer for unix systems. What's wrong with these routines: pthread_rwlock_init,