mirror of
https://github.com/gnustep/libs-sqlclient.git
synced 2025-02-21 02:41:07 +00:00
tweaks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/sqlclient/trunk@37853 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0b8dc96fa2
commit
1d93696eb4
1 changed files with 3 additions and 5 deletions
|
@ -62,10 +62,8 @@
|
||||||
#include "SQLClient.h"
|
#include "SQLClient.h"
|
||||||
|
|
||||||
#if defined(GNUSTEP_BASE_LIBRARY)
|
#if defined(GNUSTEP_BASE_LIBRARY)
|
||||||
#include <GNUstepBase/GSLock.h>
|
|
||||||
#define SUBCLASS_RESPONSIBILITY [self subclassResponsibility: _cmd];
|
#define SUBCLASS_RESPONSIBILITY [self subclassResponsibility: _cmd];
|
||||||
#else
|
#else
|
||||||
#define GSLazyRecursiveLock NSRecursiveLock
|
|
||||||
#define SUBCLASS_RESPONSIBILITY
|
#define SUBCLASS_RESPONSIBILITY
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -972,7 +970,7 @@ static unsigned int maxConnections = 8;
|
||||||
{
|
{
|
||||||
clientsMap = NSCreateMapTable(NSObjectMapKeyCallBacks,
|
clientsMap = NSCreateMapTable(NSObjectMapKeyCallBacks,
|
||||||
NSNonRetainedObjectMapValueCallBacks, 0);
|
NSNonRetainedObjectMapValueCallBacks, 0);
|
||||||
clientsMapLock = [GSLazyRecursiveLock new];
|
clientsMapLock = [NSRecursiveLock new];
|
||||||
beginStatement = [[NSArray arrayWithObject: beginString] retain];
|
beginStatement = [[NSArray arrayWithObject: beginString] retain];
|
||||||
commitStatement = [[NSArray arrayWithObject: commitString] retain];
|
commitStatement = [[NSArray arrayWithObject: commitString] retain];
|
||||||
rollbackStatement = [[NSArray arrayWithObject: rollbackString] retain];
|
rollbackStatement = [[NSArray arrayWithObject: rollbackString] retain];
|
||||||
|
@ -1076,7 +1074,7 @@ static unsigned int maxConnections = 8;
|
||||||
[self simpleExecute: beginStatement];
|
[self simpleExecute: beginStatement];
|
||||||
/* NB. We leave the lock locked ... until a matching -commit
|
/* NB. We leave the lock locked ... until a matching -commit
|
||||||
* or -rollback is called. This prevents other threads from
|
* or -rollback is called. This prevents other threads from
|
||||||
* intefering with this transaction.
|
* interfering with this transaction.
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
NS_HANDLER
|
NS_HANDLER
|
||||||
|
@ -1407,7 +1405,7 @@ static unsigned int maxConnections = 8;
|
||||||
existing = (SQLClient*)NSMapGet(clientsMap, reference);
|
existing = (SQLClient*)NSMapGet(clientsMap, reference);
|
||||||
if (existing == nil)
|
if (existing == nil)
|
||||||
{
|
{
|
||||||
lock = [GSLazyRecursiveLock new]; // Ensure thread-safety.
|
lock = [NSRecursiveLock new]; // Ensure thread-safety.
|
||||||
[self setDebugging: [[self class] debugging]];
|
[self setDebugging: [[self class] debugging]];
|
||||||
[self setDurationLogging: [[self class] durationLogging]];
|
[self setDurationLogging: [[self class] durationLogging]];
|
||||||
[self setName: reference]; // Set name and store in cache.
|
[self setName: reference]; // Set name and store in cache.
|
||||||
|
|
Loading…
Reference in a new issue