mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
patch to improve thread startup by Larry Campbell
This commit is contained in:
parent
1cf38dee99
commit
41d948b5bb
2 changed files with 6 additions and 5 deletions
|
@ -1,7 +1,12 @@
|
|||
2024-01-08 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSOperation.m: patch for issue #366 by Larry Campbell.
|
||||
|
||||
2024-01-08 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSJSONSerialization.m: Fix for issue #365 ... don't try to
|
||||
create a string ending with the first half of a unicode surrogate pair.
|
||||
|
||||
2024-01-08 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSNotificationCenter.m: fix for memory leak should keep the
|
||||
|
|
|
@ -1112,17 +1112,13 @@ static NSOperationQueue *mainQueue = nil;
|
|||
}
|
||||
else
|
||||
{
|
||||
NSUInteger pending;
|
||||
|
||||
[internal->cond lock];
|
||||
pending = [internal->starting count];
|
||||
[internal->starting addObject: op];
|
||||
|
||||
/* Create a new thread if all existing threads are busy and
|
||||
* we haven't reached the pool limit.
|
||||
*/
|
||||
if (0 == internal->threadCount
|
||||
|| (pending > 0 && internal->threadCount < max))
|
||||
if (internal->threadCount < max)
|
||||
{
|
||||
internal->threadCount++;
|
||||
NS_DURING
|
||||
|
|
Loading…
Reference in a new issue