squall/storm/thread/mac/SThreadRunner.mm

24 lines
465 B
Text
Raw Normal View History

2020-11-01 17:45:45 -06:00
#include "storm/thread/mac/SThreadRunner.h"
#include "storm/thread/S_Thread.hpp"
2020-09-09 00:45:46 -05:00
@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