|
@@ -71,7 +71,7 @@ extension DispatchQueue {
|
|
|
// This method will dispatch the `block` to self.
|
|
// This method will dispatch the `block` to self.
|
|
|
// If `self` is the main queue, and current thread is main thread, the block
|
|
// If `self` is the main queue, and current thread is main thread, the block
|
|
|
// will be invoked immediately instead of being dispatched.
|
|
// will be invoked immediately instead of being dispatched.
|
|
|
- func safeAsync(_ block: @escaping ()->()) {
|
|
|
|
|
|
|
+ func safeAsync(_ block: @escaping () -> Void) {
|
|
|
if self === DispatchQueue.main && Thread.isMainThread {
|
|
if self === DispatchQueue.main && Thread.isMainThread {
|
|
|
block()
|
|
block()
|
|
|
} else {
|
|
} else {
|