Skip to content

Thread Pool is a thread queue. You could push threads to ThreadPool, and then it will process the thread.

Notifications You must be signed in to change notification settings

nullpic/ThreadPool

Repository files navigation

#ThreadPool 1.0

Kelp http://kelp.phate.org/
MIT License

Thread Pool is a thread queue.
You could push threads to ThreadPool, and then it will process the thread.

ThreadPool *pool = [ThreadPool new]; NSThread *thread = [[NSThreadalloc] initWithTarget:selfselector:@selector(threadExecuteCode) object:nil]; thread.name = @"Thread A"; [pool pushThread:thread]; thread = [[NSThreadalloc] initWithTarget:selfselector:@selector(threadExecuteCode) object:nil]; thread.name = @"Thread B"; [pool pushThread:thread];
- (void)threadExecuteCode{for (int index = 0; index < 10; index++){NSLog(@"%@: %i", [NSThreadcurrentThread].name, index)} }

About

Thread Pool is a thread queue. You could push threads to ThreadPool, and then it will process the thread.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published