improve comments

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/sqlclient/trunk@37891 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2014-05-17 09:47:58 +00:00
parent 11a7dcde3b
commit eaba923481
2 changed files with 135 additions and 119 deletions

View file

@ -1238,7 +1238,11 @@ SQLCLIENT_PRIVATE
/**
* The default implementation calls NSLogv to log a debug message.<br />
* Override this in a category to provide more sophisticated logging.
* Override this in a category to provide more sophisticated logging.<br />
* Do NOT override with code which can be slow or which calls (directly
* or indirectly) any SQLCLient methods, since this method will be used
* inside locked regions of the SQLClient code and you could cause
* deadlocks or long delays to other threads using the class.
*/
- (void) debug: (NSString*)fmt, ...;

View file

@ -1403,7 +1403,7 @@ static unsigned int maxConnections = 8;
[clientsMapLock lock];
existing = (SQLClient*)NSMapGet(clientsMap, reference);
if (existing == nil)
if (nil == existing)
{
lock = [NSRecursiveLock new]; // Ensure thread-safety.
[self setDebugging: [[self class] debugging]];
@ -2194,11 +2194,15 @@ static unsigned int maxConnections = 8;
*/
- (void) _configure: (NSNotification*)n
{
NSDictionary *o = [n object];
NSDictionary *o;
NSDictionary *d;
NSString *s;
Class c;
[lock lock];
NS_DURING
{
o = [n object];
/*
* get dictionary containing config info for this client by name.
*/
@ -2330,6 +2334,14 @@ static unsigned int maxConnections = 8;
}
}
[self setPassword: s];
}
NS_HANDLER
{
[lock unlock];
[localException raise];
}
NS_ENDHANDLER
[lock unlock];
}
/** Internal method to populate the cache with the result of a query.