Re: Hard Core Threading (TMREWS on Linux)



On 2005-05-30, warren.bare@xxxxxxxxx <warren.bare@xxxxxxxxx> wrote:
> On Linux Borland downgrades the TMultiReadExclusiveWriteSynchronizer to
> a TSimpleRWSync which is basically just a TCriticalSection.
>
> I don't know why it was hard to solve this problem. If you are a
> thread guru, please help me understand.

> I wrote a platform independant TMREWS (included below). The only
> limitation is that you can not enter a write lock from within a read
> lock.

I'm not a guru either, but I kept track of discussions about this topic. Note that
TMREWS has a history of bugs and raceconditions even on windows.

I quickly looked in my URL library, and the only thing I saved about the unix implementation
is this

http://developers.sun.com/solaris/articles/waitfor_api.pdf

There was somethign with waitfor like syntax being needed for a raceless tmrews, I however don't
remember what, and it might also already be hidden in the primitives you use.
.