ObjFW  Diff

Differences From Artifact [5b323e884d]:

To Artifact [588dc64cd5]:


17
18
19
20
21
22
23

24
25
26
27
28
29
30
#include "config.h"

#import "OFThreadPool.h"
#import "OFArray.h"
#import "OFList.h"
#import "OFThread.h"
#import "OFCondition.h"


#import "autorelease.h"

@interface OFThreadPoolJob: OFObject
{
	id target;
	SEL selector;







>







17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "config.h"

#import "OFThreadPool.h"
#import "OFArray.h"
#import "OFList.h"
#import "OFThread.h"
#import "OFCondition.h"
#import "OFSystemInfo.h"

#import "autorelease.h"

@interface OFThreadPoolJob: OFObject
{
	id target;
	SEL selector;
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
+ (instancetype)threadPoolWithSize: (size_t)size
{
	return [[[self alloc] initWithSize: size] autorelease];
}

- init
{
	return [self initWithSize: of_num_cpus];
}

- initWithSize: (size_t)size_
{
	self = [super init];

	@try {







|







251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
+ (instancetype)threadPoolWithSize: (size_t)size
{
	return [[[self alloc] initWithSize: size] autorelease];
}

- init
{
	return [self initWithSize: [OFSystemInfo numberOfCPUs]];
}

- initWithSize: (size_t)size_
{
	self = [super init];

	@try {