Follow-up Comment #6, bug #25307 (project gnustep):
> > The point of "tryLock" and "tryLockWhenCondition:" is to attempt to do
the
> > lock and return NO, if it can't.
> Sure ... but the rationale was that, if the lock is held by the current
> thread then calling it is evidence of a probable bug.
In the code I'm porting it wasn't evidence of a bug, although it might be
argued that it was evidence of some laziness in coding. :-)
In any case, I didn't file this bug report because GNUstep's philosophy
seemed wrong, but because its behavior was different from Cocoa's. At this
point I've cleaned up my code so it no longer tries the lock when it already
holds it, but I thought you'd like to know that Cocoa simply returns NO on the
"try..." methods if it's not able to obtain the lock (for whatever reason).
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?25307>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
_______________________________________________
Bug-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gnustep