我使用三个函数,我需要在不同的线程中使用,因为当我执行一个函数时,在视图中显示的函数会崩溃..
我正在尝试此代码:
当actions是一个函数时,但是这个崩溃也使用了这个代码
var concurrentQueue: dispatch_queue_t =
dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
dispatch_async(concurrentQueue, {
self.actions()
dispatch_async(dispatch_get_main_queue(), {
println("Completed")
});
})
我在做什么?
谢谢!