mirror of
https://github.com/gnustep/libs-performance.git
synced 2025-02-19 10:01:20 +00:00
Report whether pool is suspended
This commit is contained in:
parent
09dfc1c403
commit
633c3a6da7
2 changed files with 6 additions and 4 deletions
|
@ -54,7 +54,7 @@
|
|||
/** Returns an instance intended for sharing between sections of code which
|
||||
* wish to make use of threading by performing operations in other threads,
|
||||
* but which don't mind operations being interleaved with those belonging to
|
||||
* oither sections of code.<br />
|
||||
* other sections of code.<br />
|
||||
* Always returns the same instance whenever the method is called.
|
||||
*/
|
||||
+ (GSThreadPool*) sharedPool;
|
||||
|
|
|
@ -128,9 +128,11 @@ static GSThreadPool *shared = nil;
|
|||
result = [NSString stringWithFormat:
|
||||
@"%@ %@ queue: %"PRIuPTR"(%"PRIuPTR")"
|
||||
@" threads: %"PRIuPTR"(%"PRIuPTR")"
|
||||
@" active: %"PRIuPTR" processed: %"PRIuPTR"",
|
||||
@" active: %"PRIuPTR" processed: %"PRIuPTR""
|
||||
@" suspended: %s",
|
||||
[super description], poolName, operations->count, maxOperations,
|
||||
idle->count + live->count, maxThreads, live->count, processed];
|
||||
idle->count + live->count, maxThreads, live->count, processed,
|
||||
(suspended ? "yes" : "no")];
|
||||
[poolLock unlock];
|
||||
return result;
|
||||
}
|
||||
|
@ -507,7 +509,7 @@ static GSThreadPool *shared = nil;
|
|||
|
||||
#if !defined (GNUSTEP) && (MAC_OS_X_VERSION_MAX_ALLOWED<=MAC_OS_X_VERSION_10_4)
|
||||
/* With the older thread API we must set up the link item *after* the
|
||||
* thread starts. With the new API this is not needed as we cans set
|
||||
* thread starts. With the new API this is not needed as we can set
|
||||
* things up and then start the thread.
|
||||
*/
|
||||
[link setItem: [NSThread currentThread]];
|
||||
|
|
Loading…
Reference in a new issue