IOS-1480 Remove GCD in favor of toolbox. IOS-1480
authorDirk Zimmermann <dz@pep.security>
Thu, 21 Feb 2019 13:42:30 +0100
branchIOS-1480
changeset 1294e56317c5027a
parent 1293 a9f14743ac80
child 1295 a9a46e997c07
IOS-1480 Remove GCD in favor of toolbox.
MessageModel/MessageModel.xcodeproj/project.pbxproj
MessageModel/MessageModel/NetworkService/Util/GCD.swift
     1.1 --- a/MessageModel/MessageModel.xcodeproj/project.pbxproj	Thu Feb 21 13:42:30 2019 +0100
     1.2 +++ b/MessageModel/MessageModel.xcodeproj/project.pbxproj	Thu Feb 21 13:42:30 2019 +0100
     1.3 @@ -57,7 +57,6 @@
     1.4  		43EA4847221E9518006E8F83 /* ImapConnectionDataCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43EA47EA221E9518006E8F83 /* ImapConnectionDataCache.swift */; };
     1.5  		43EA4848221E9518006E8F83 /* EmailConnectInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43EA47EB221E9518006E8F83 /* EmailConnectInfo.swift */; };
     1.6  		43EA4849221E9518006E8F83 /* ImapFolderBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43EA47EC221E9518006E8F83 /* ImapFolderBuilder.swift */; };
     1.7 -		43EA484A221E9518006E8F83 /* GCD.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43EA47EE221E9518006E8F83 /* GCD.swift */; };
     1.8  		43EA484B221E9518006E8F83 /* CdMessagePredicateFactory+Imap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43EA47EF221E9518006E8F83 /* CdMessagePredicateFactory+Imap.swift */; };
     1.9  		43EA484C221E9518006E8F83 /* Log+ASL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43EA47F0221E9518006E8F83 /* Log+ASL.swift */; };
    1.10  		43EA484D221E9518006E8F83 /* Folder+Imap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43EA47F1221E9518006E8F83 /* Folder+Imap.swift */; };
    1.11 @@ -246,7 +245,6 @@
    1.12  		43EA47EA221E9518006E8F83 /* ImapConnectionDataCache.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImapConnectionDataCache.swift; sourceTree = "<group>"; };
    1.13  		43EA47EB221E9518006E8F83 /* EmailConnectInfo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EmailConnectInfo.swift; sourceTree = "<group>"; };
    1.14  		43EA47EC221E9518006E8F83 /* ImapFolderBuilder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImapFolderBuilder.swift; sourceTree = "<group>"; };
    1.15 -		43EA47EE221E9518006E8F83 /* GCD.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GCD.swift; sourceTree = "<group>"; };
    1.16  		43EA47EF221E9518006E8F83 /* CdMessagePredicateFactory+Imap.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "CdMessagePredicateFactory+Imap.swift"; sourceTree = "<group>"; };
    1.17  		43EA47F0221E9518006E8F83 /* Log+ASL.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Log+ASL.swift"; sourceTree = "<group>"; };
    1.18  		43EA47F1221E9518006E8F83 /* Folder+Imap.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Folder+Imap.swift"; sourceTree = "<group>"; };
    1.19 @@ -601,7 +599,6 @@
    1.20  		43EA47ED221E9518006E8F83 /* Util */ = {
    1.21  			isa = PBXGroup;
    1.22  			children = (
    1.23 -				43EA47EE221E9518006E8F83 /* GCD.swift */,
    1.24  				43EA47EF221E9518006E8F83 /* CdMessagePredicateFactory+Imap.swift */,
    1.25  				43EA47F0221E9518006E8F83 /* Log+ASL.swift */,
    1.26  				43EA47F1221E9518006E8F83 /* Folder+Imap.swift */,
    1.27 @@ -1078,7 +1075,6 @@
    1.28  				1587D167204DA3C3002C2157 /* KeyChain+Extensions.swift in Sources */,
    1.29  				43EA4886221E9518006E8F83 /* MySelfOperation.swift in Sources */,
    1.30  				8B8D22911DBA164E000BDE79 /* ServerCredentials.swift in Sources */,
    1.31 -				43EA484A221E9518006E8F83 /* GCD.swift in Sources */,
    1.32  				43EA488A221E9518006E8F83 /* UnifiedInbox.swift in Sources */,
    1.33  				43C32E261DBF9C69007CFB1A /* MessageModelDelegates.swift in Sources */,
    1.34  				43EA4894221E9518006E8F83 /* ImapSyncError.swift in Sources */,
     2.1 --- a/MessageModel/MessageModel/NetworkService/Util/GCD.swift	Thu Feb 21 13:42:30 2019 +0100
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,31 +0,0 @@
     2.4 -//
     2.5 -//  GCD.swift
     2.6 -//  pEpForiOS
     2.7 -//
     2.8 -//  Created by Dirk Zimmermann on 20/04/16.
     2.9 -//  Copyright © 2016 p≡p Security S.A. All rights reserved.
    2.10 -//
    2.11 -
    2.12 -struct GCD {
    2.13 -    /**
    2.14 -     Since you will do this all the time in UI callbacks.
    2.15 -     */
    2.16 -    static func onMain(_ block: @escaping () -> Void) {
    2.17 -        DispatchQueue.main.async(execute: {
    2.18 -            block()
    2.19 -        })
    2.20 -    }
    2.21 -
    2.22 -    /**
    2.23 -     Since you will do this all the time in UI callbacks.
    2.24 -     */
    2.25 -    static func onMainWait(_ block: @escaping () -> Void) {
    2.26 -        if Thread.isMainThread {
    2.27 -            block()
    2.28 -        } else {
    2.29 -            DispatchQueue.main.sync(execute: {
    2.30 -                block()
    2.31 -            })
    2.32 -        }
    2.33 -    }
    2.34 -}