-[NSTask completionHandler]
にセットしたブロックはメインでないスレッドで実行される。必要に応じてメインスレッドにディスパッチするとよい。
task.terminationHandler = ^(NSTask *task) {
dispatch_async(dispatch_get_main_queue(), ^{
doSomething();
});
};
More than 5 years have passed since last update.
-[NSTask completionHandler]
にセットしたブロックはメインでないスレッドで実行される。必要に応じてメインスレッドにディスパッチするとよい。
task.terminationHandler = ^(NSTask *task) {
dispatch_async(dispatch_get_main_queue(), ^{
doSomething();
});
};
Register as a new user and use Qiita more conveniently