bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSLock behavior


From: Morgan Giddings
Subject: NSLock behavior
Date: Mon, 17 Oct 2005 15:56:19 -0400

I am not sure whether this is a bug, or a difference in interpretation of the OpenStep spec... I apologize if this has been discussed before.

In Cocoa Foundation, if I have an NSLock that has not already been locked, and I do:

[myLock unlock]

it is ignored, and the program continues.

In GNUStep, the same thing (trying unlock on something that has not been locked), it causes an exception. This is because in the GNUStep implementation, if objc_mutex_unlock returns -1, the exception is raised. Is this necessary?

I wouldn't ask about this, except that working around the difference in the code I'm porting is not entirely trivial....

Thanks!

Morgan Giddings, Assistant Professor
Departments of Microbiology/Immunology and Biomedical Engineering
UNC-Chapel Hill
919-843-3513, giddings@unc.edu
http://bioinfo.unc.edu/giddings.html





reply via email to

[Prev in Thread] Current Thread [Next in Thread]