feat(thread): add thread functions

This commit is contained in:
fallenoak 2020-09-09 00:45:46 -05:00
parent d0487caba3
commit 266bdc7737
No known key found for this signature in database
GPG key ID: 7628F8E61AEA070D
16 changed files with 523 additions and 0 deletions

View file

@ -0,0 +1,23 @@
#include "thread/mac/SThreadRunner.h"
#include "thread/S_Thread.hpp"
@implementation SThreadRunner
- (instancetype)init:(SThreadParmBlock*)params {
if (self = [super init]) {
self.m_params = params;
self.m_autoreleasePool = nullptr;
}
return self;
}
- (void)run {
self.m_autoreleasePool = [[NSAutoreleasePool alloc] init];
S_Thread::s_SLaunchThread(self.m_params);
[self.m_autoreleasePool release];
}
@end