ObjFW  Diff

Differences From Artifact [46f0aec229]:

To Artifact [743cbdc4ee]:


329
330
331
332
333
334
335
336

337
338
339
340
341
342
343
329
330
331
332
333
334
335

336
337
338
339
340
341
342
343







-
+







	[queue release];
	[queueCondition release];
	[countCondition release];

	[super dealloc];
}

- (void)_dispatchJob: (OFThreadPoolJob*)job
- (void)OF_dispatchJob: (OFThreadPoolJob*)job
{
	of_atomic_inc_int(&count);

	[queueCondition lock];
	@try {
		[queue appendObject: job];
		[queueCondition signal];
361
362
363
364
365
366
367
368
369
370



371
372
373
374
375
376
377


378
379
380
381
382
383
384


385
386
387
388
389
390
391
392
361
362
363
364
365
366
367



368
369
370
371
372
373
374
375


376
377
378
379
380
381
382


383
384
385
386
387
388
389
390
391
392







-
-
-
+
+
+





-
-
+
+





-
-
+
+








	}
}

- (void)dispatchWithTarget: (id)target
		  selector: (SEL)selector
		    object: (id)object
{
	[self _dispatchJob: [OFThreadPoolJob jobWithTarget: target
						  selector: selector
						    object: object]];
	[self OF_dispatchJob: [OFThreadPoolJob jobWithTarget: target
						    selector: selector
						      object: object]];
}

#ifdef OF_HAVE_BLOCKS
- (void)dispatchWithBlock: (of_thread_pool_block_t)block
{
	[self _dispatchJob: [OFThreadPoolJob jobWithBlock: block
						   object: nil]];
	[self OF_dispatchJob: [OFThreadPoolJob jobWithBlock: block
						     object: nil]];
}

- (void)dispatchWithBlock: (of_thread_pool_block_t)block
		   object: (id)object
{
	[self _dispatchJob: [OFThreadPoolJob jobWithBlock: block
						   object: object]];
	[self OF_dispatchJob: [OFThreadPoolJob jobWithBlock: block
						     object: object]];
}
#endif

- (size_t)size
{
	return size;
}
@end