mirror of
https://github.com/thunderbrewhq/squall.git
synced 2025-12-12 10:32:29 +00:00
23 lines
453 B
Text
23 lines
453 B
Text
#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
|