Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

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 = [[NSThread alloc] initWithTarget:self
                                           selector:@selector(threadExecuteCode)
                                             object:nil];
thread.name = @"Thread A";
[pool pushThread:thread];

thread = [[NSThread alloc] initWithTarget:self
                                 selector:@selector(threadExecuteCode)
                                   object:nil];
thread.name = @"Thread B";
[pool pushThread:thread];
- (void)threadExecuteCode
{
    for (int index = 0; index < 10; index++) {
        NSLog(@"%@: %i", [NSThread currentThread].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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.