Follow-up Comment #2, bug #25307 (project gnustep):

If this is about the exception thrown if a single thread attempts to lock the
same lock twice, it's not a behavior specific to NSConditionLock (only an
NSRecursiveLock is allowed to be locked twice by a thread).

If the exception is something else, please disregard the rest of this
comment...

The Cocoa documentation actually says nothing about exceptions in this case,
but  I recall there was some discussion about lock behavior a few years ago,
which concluded that the GNUstep behavior was the best available ... it
returns NO if the lock is unavailable, but raises an exception if you try to
lock the lock twice from the same thread, since locking twice from the same
thread is almost guaranteed to be a programming error.

If we want to remove this check, we need to do it consistently for all locks
and document the new behavior.
Perhaps we could change to logging a warning instead of raising an exception
(and/or restricting the behavior to the debug version of the library) ... once
we have tested MacOS-X behavior with a test case.

    _______________________________________________________

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

Reply via email to