remove some unnecessary code

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/performance/trunk@38512 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2015-05-19 14:29:54 +00:00
parent f2fec29ccc
commit e032b577af

View file

@ -204,12 +204,12 @@ best(NSMutableArray *a)
GSIOThread *t; GSIOThread *t;
NSUInteger c; NSUInteger c;
[classLock lock];
if (0 == maxThreads) if (0 == maxThreads)
{ {
[classLock unlock];
return [NSThread mainThread]; return [NSThread mainThread];
} }
[classLock lock];
t = best(threads); t = best(threads);
if (nil == t || ((c = [t _count]) > 0 && [threads count] < maxThreads)) if (nil == t || ((c = [t _count]) > 0 && [threads count] < maxThreads))
{ {
@ -279,9 +279,7 @@ best(NSMutableArray *a)
- (void) setThreads: (NSUInteger)max - (void) setThreads: (NSUInteger)max
{ {
[classLock lock];
maxThreads = max; maxThreads = max;
[classLock unlock];
} }
- (void) setTimeout: (NSTimeInterval)t - (void) setTimeout: (NSTimeInterval)t