fix deadlock

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/sqlclient/trunk@38717 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2015-06-29 10:38:39 +00:00
parent 68048a3019
commit ba050a9adf
3 changed files with 12 additions and 4 deletions

View file

@ -1,3 +1,11 @@
2015-06-29 Richard Frith-Macdonald <rfm@gnu.org>
* SQLClient.h:
* SQLClient.m:
* SQLClientPool.m:
Implement another missing convenience method.
Fix locking error when executing a batch.
2015-06-27 Richard Frith-Macdonald <rfm@gnu.org>
* SQLClient.h:

View file

@ -3543,7 +3543,7 @@ static int poolConnections = 0;
if (_count > 0)
{
NSRecursiveLock *dbLock = [_db _lock];
NSRecursiveLock *dbLock;
SQLClientPool *pool = nil;
SQLClient *db;

View file

@ -337,7 +337,7 @@
}
u[found] = YES;
t[found] = now;
[lock unlockWithCondition: cond];
[self _unlock];
client = [c[found] autorelease];
if (_debugging > 2)
{
@ -742,7 +742,7 @@
{
unsigned int index;
[lock lock];
[self _lock];
for (index = 0; index < max; index++)
{
SQLClient *client = c[index];
@ -759,7 +759,7 @@
[client setClientName: n];
}
}
[lock unlock];
[self _unlock];
}
- (SQLTransaction*) transaction