> -----Original Message-----
> From: Branko Čibej [mailto:[EMAIL PROTECTED]
> Subject: Re: Can a thread write-lock a rwlock that it already has read-
> locked?
> 
> David Barrett wrote:
> 
> >Anyway, that's my goal, and while I'd love any feedback on my approach
> >(especially to point out any gaping logic holes I've overlooked), I think
> >I'm all set.
> >
> I think your algorithm is a deadlock waiting to happen. 

Yikes, that's a good example you give.  I will definitely keep an eye on
that.  

Also, I realize I was a bit glowing and flippant in extolling the virtues of
my proposal.  But its measure shouldn't be "can it deadlock", because all
locking schemes can.  Rather, it should be "is it easier to code
non-deadlocking code with this?"  That's a judgment call, and even I haven't
made up my mind yet.

But I totally agree, inventing new locking schemes is a dangerous game, and
I definitely hear your advice on sticking closer to the "tried and true"
approaches.

Thanks for the discussion.

-david

Reply via email to