├── README.md ├── gcdExamples ├── gcdExamples.xcodeproj │ ├── project.xcworkspace │ │ └── xcuserdata │ │ │ └── aishchukin.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ ├── xcuserdata │ │ └── aishchukin.xcuserdatad │ │ │ └── xcschemes │ │ │ └── xcschememanagement.plist │ └── project.pbxproj ├── gcdExamplesTests │ ├── ConcurrentPerformTest.swift │ ├── DispatchWorkItemNotifyTest.swift │ ├── AsyncAfterTest.swift │ ├── Info.plist │ ├── DispatchWorkItemCancelTest.swift │ ├── AsyncVsSyncSerialTest.swift │ ├── AsyncVsSyncConcurrentTest.swift │ ├── DispatchSourceTest.swift │ ├── TargetQueueHierarchyTest.swift │ ├── DispatchGroupTest.swift │ ├── DispatchBarrierTest.swift │ └── DispatchSemaphoreTest.swift └── gcdExamples │ ├── ViewController.swift │ ├── Info.plist │ ├── Base.lproj │ ├── Main.storyboard │ └── LaunchScreen.storyboard │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ └── AppDelegate.swift ├── OperationExamples ├── OperationExamples.xcodeproj │ ├── project.xcworkspace │ │ └── xcuserdata │ │ │ └── aishchukin.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ ├── xcuserdata │ │ └── aishchukin.xcuserdatad │ │ │ └── xcschemes │ │ │ └── xcschememanagement.plist │ └── project.pbxproj ├── OperationExamplesTests │ ├── BlockOperationTest.swift │ ├── DependenciesTest.swift │ ├── Info.plist │ ├── OperationSuspendTest.swift │ ├── OperationCancelTest.swift │ ├── OperationCountTest.swift │ ├── OperationTest.swift │ ├── WaitOperationTest.swift │ └── AsyncOperationTest.swift └── OperationExamples │ ├── ViewController.swift │ ├── Info.plist │ ├── Base.lproj │ ├── Main.storyboard │ └── LaunchScreen.storyboard │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ └── AppDelegate.swift └── MultithreadingExamples ├── MultithreadingExamplesTests ├── SynchronizedTest.swift ├── UnfairLockTest.swift ├── SpinLockTest.swift ├── LockTest.swift ├── AtomicOperationsTest.swift ├── Info.plist ├── ThreadTest.swift ├── RecursiveLockTest.swift ├── QosTest.swift ├── ReadWriteLockTest.swift └── ConditionTest.swift ├── MultithreadingExamples.xcodeproj ├── project.xcworkspace │ └── xcuserdata │ │ └── aishchukin.xcuserdatad │ │ └── UserInterfaceState.xcuserstate ├── xcuserdata │ └── aishchukin.xcuserdatad │ │ └── xcschemes │ │ └── xcschememanagement.plist └── project.pbxproj └── MultithreadingExamples ├── ViewController.swift ├── Info.plist ├── Base.lproj ├── Main.storyboard └── LaunchScreen.storyboard ├── Assets.xcassets └── AppIcon.appiconset │ └── Contents.json └── AppDelegate.swift /README.md: -------------------------------------------------------------------------------- 1 | # multithreadingCourseExamples -------------------------------------------------------------------------------- /gcdExamples/gcdExamples.xcodeproj/project.xcworkspace/xcuserdata/aishchukin.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shchukin-alex/multithreadingCourseExamples/HEAD/gcdExamples/gcdExamples.xcodeproj/project.xcworkspace/xcuserdata/aishchukin.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /OperationExamples/OperationExamples.xcodeproj/project.xcworkspace/xcuserdata/aishchukin.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shchukin-alex/multithreadingCourseExamples/HEAD/OperationExamples/OperationExamples.xcodeproj/project.xcworkspace/xcuserdata/aishchukin.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /MultithreadingExamples/MultithreadingExamplesTests/SynchronizedTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | class SynchronizedTest: XCTestCase { 4 | 5 | private let lock = NSObject() 6 | 7 | func test() { 8 | objc_sync_enter(lock) 9 | //Do something... 10 | objc_sync_exit(lock) 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /MultithreadingExamples/MultithreadingExamples.xcodeproj/project.xcworkspace/xcuserdata/aishchukin.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shchukin-alex/multithreadingCourseExamples/HEAD/MultithreadingExamples/MultithreadingExamples.xcodeproj/project.xcworkspace/xcuserdata/aishchukin.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /MultithreadingExamples/MultithreadingExamplesTests/UnfairLockTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | class UnfairLockTest: XCTestCase { 4 | 5 | private var lock = os_unfair_lock_s() 6 | 7 | func test() { 8 | os_unfair_lock_lock(&lock) 9 | //Do something... 10 | os_unfair_lock_unlock(&lock) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /gcdExamples/gcdExamples.xcodeproj/xcuserdata/aishchukin.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | gcdExamples.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /OperationExamples/OperationExamples.xcodeproj/xcuserdata/aishchukin.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | OperationExamples.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /MultithreadingExamples/MultithreadingExamples.xcodeproj/xcuserdata/aishchukin.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | MultithreadingExamples.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /MultithreadingExamples/MultithreadingExamplesTests/SpinLockTest.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SpinLockTest.swift 3 | // MultithreadingTestTests 4 | // 5 | // Created by Щукин Алексей on 20/02/2018. 6 | // Copyright © 2018 Alexey Shchukin. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class SpinLockTest: XCTestCase { 12 | 13 | private var lock = OS_SPINLOCK_INIT 14 | 15 | func test() { 16 | OSSpinLockLock(&lock) 17 | //Do something ... 18 | OSSpinLockUnlock(&lock) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /OperationExamples/OperationExamplesTests/BlockOperationTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | class BlockOperationTest: XCTestCase { 4 | 5 | func test() { 6 | 7 | let expect = expectation(description: "BlockOperationTest") 8 | 9 | let blockOperation = BlockOperation { 10 | print("test") 11 | expect.fulfill() 12 | } 13 | let operationQueue = OperationQueue() 14 | operationQueue.addOperation(blockOperation) 15 | 16 | wait(for: [expect], timeout: 10) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /gcdExamples/gcdExamplesTests/ConcurrentPerformTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | class ConcurrentPerformTest: XCTestCase { 4 | 5 | private let iterationCount = 3 6 | 7 | func test() { 8 | let exp = expectation(description: "ConcurrentPerform") 9 | exp.expectedFulfillmentCount = iterationCount 10 | 11 | DispatchQueue.concurrentPerform(iterations: iterationCount, execute: { i in 12 | print(i) 13 | exp.fulfill() 14 | }) 15 | 16 | wait(for: [exp], timeout: 10) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /MultithreadingExamples/MultithreadingExamplesTests/LockTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | class LockTest: XCTestCase { 4 | 5 | //MARK: - Test 1 6 | 7 | private var mutex = pthread_mutex_t() 8 | 9 | func test1() { 10 | pthread_mutex_init(&mutex, nil) 11 | pthread_mutex_lock(&mutex) 12 | //Do something 13 | pthread_mutex_unlock(&mutex) 14 | } 15 | 16 | //MARK: - Test 2 17 | 18 | private let lock = NSLock() 19 | 20 | func test2() { 21 | lock.lock() 22 | //Do something 23 | lock.unlock() 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /MultithreadingExamples/MultithreadingExamplesTests/AtomicOperationsTest.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AtomicOperationsTest.swift 3 | // MultithreadingTestTests 4 | // 5 | // Created by Щукин Алексей on 20/02/2018. 6 | // Copyright © 2018 Alexey Shchukin. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class AtomicOperationsTest: XCTestCase { 12 | 13 | private var i: Int64 = 0 14 | private var y: UInt32 = 0 15 | 16 | func test() { 17 | 18 | OSAtomicCompareAndSwap64Barrier(i, 10, &i) 19 | OSAtomicAdd64Barrier(20, &i) 20 | OSAtomicIncrement64Barrier(&i) 21 | OSAtomicAnd32Barrier(1, &y) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /gcdExamples/gcdExamples/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // gcdExamples 4 | // 5 | // Created by Щукин Алексей on 19/02/2018. 6 | // Copyright © 2018 Alexey Shchukin. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | // Do any additional setup after loading the view, typically from a nib. 16 | } 17 | 18 | override func didReceiveMemoryWarning() { 19 | super.didReceiveMemoryWarning() 20 | // Dispose of any resources that can be recreated. 21 | } 22 | 23 | 24 | } 25 | 26 | -------------------------------------------------------------------------------- /OperationExamples/OperationExamples/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // OperationExamples 4 | // 5 | // Created by Щукин Алексей on 19/02/2018. 6 | // Copyright © 2018 Alexey Shchukin. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | // Do any additional setup after loading the view, typically from a nib. 16 | } 17 | 18 | override func didReceiveMemoryWarning() { 19 | super.didReceiveMemoryWarning() 20 | // Dispose of any resources that can be recreated. 21 | } 22 | 23 | 24 | } 25 | 26 | -------------------------------------------------------------------------------- /MultithreadingExamples/MultithreadingExamples/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // MultithreadingExamples 4 | // 5 | // Created by Щукин Алексей on 20/02/2018. 6 | // Copyright © 2018 Alexey Shchukin. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | // Do any additional setup after loading the view, typically from a nib. 16 | } 17 | 18 | override func didReceiveMemoryWarning() { 19 | super.didReceiveMemoryWarning() 20 | // Dispose of any resources that can be recreated. 21 | } 22 | 23 | 24 | } 25 | 26 | -------------------------------------------------------------------------------- /gcdExamples/gcdExamplesTests/DispatchWorkItemNotifyTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | class DispatchWorkItemNotifyTest: XCTestCase { 4 | 5 | private let queue = DispatchQueue(label: "DispatchWorkItemTest1", attributes: .concurrent) 6 | 7 | func test() { 8 | let expect = expectation(description: "DispatchWorkItemNotify") 9 | 10 | let item = DispatchWorkItem { 11 | print("test") 12 | } 13 | 14 | item.notify(queue: DispatchQueue.main, execute: { 15 | print("finish") 16 | expect.fulfill() 17 | }) 18 | queue.async(execute: item) 19 | 20 | wait(for: [expect], timeout: 10) 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /gcdExamples/gcdExamplesTests/AsyncAfterTest.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AsyncAfter.swift 3 | // gcdExamplesTests 4 | // 5 | // Created by Щукин Алексей on 19/02/2018. 6 | // Copyright © 2018 Alexey Shchukin. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class AsyncAfterTest: XCTestCase { 12 | 13 | private let concurrentQueue = DispatchQueue(label: "AsyncAfterTest", attributes: .concurrent) 14 | 15 | func test() { 16 | 17 | func test() { 18 | let expect = expectation(description: "AsyncAfter") 19 | 20 | concurrentQueue.asyncAfter(deadline: .now() + 3, execute: { 21 | print("test") 22 | }) 23 | 24 | wait(for: [expect], timeout: 10) 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /OperationExamples/OperationExamplesTests/DependenciesTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | class DependenciesTest: XCTestCase { 4 | 5 | func test() { 6 | let expect = expectation(description: "DependenciesTest") 7 | expect.expectedFulfillmentCount = 2 8 | 9 | let operation1 = BlockOperation { 10 | print("test1") 11 | expect.fulfill() 12 | } 13 | let operation2 = BlockOperation { 14 | print("test2") 15 | expect.fulfill() 16 | } 17 | operation2.addDependency(operation1) 18 | 19 | let operationQueue = OperationQueue() 20 | operationQueue.addOperation(operation1) 21 | operationQueue.addOperation(operation2) 22 | 23 | wait(for: [expect], timeout: 10) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /gcdExamples/gcdExamplesTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /OperationExamples/OperationExamplesTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /MultithreadingExamples/MultithreadingExamplesTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /MultithreadingExamples/MultithreadingExamplesTests/ThreadTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | class ThreadTest: XCTestCase { 4 | 5 | //MARK: - Test 1 6 | 7 | func test1() { 8 | var thread = pthread_t(bitPattern: 0) 9 | var attr = pthread_attr_t() 10 | 11 | pthread_attr_init(&attr) 12 | pthread_create(&thread, &attr, { pointer in 13 | 14 | print("test") 15 | return nil 16 | }, nil) 17 | } 18 | 19 | //MARK: - Test 2 20 | 21 | func test2() { 22 | let expect = expectation(description: "ThreadTest") 23 | 24 | let nsthread = Thread(block: { 25 | print("test") 26 | expect.fulfill() 27 | }) 28 | nsthread.start() 29 | 30 | wait(for: [expect], timeout: 10) 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /OperationExamples/OperationExamplesTests/OperationSuspendTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | class OperationSuspendTest: XCTestCase { 4 | 5 | func test() { 6 | let expect = expectation(description: "OperationSuspendTest") 7 | 8 | let operation1 = BlockOperation { 9 | sleep(1) 10 | print("test1") 11 | expect.fulfill() 12 | } 13 | 14 | let operation2 = BlockOperation { 15 | sleep(1) 16 | print("test2") 17 | } 18 | 19 | let operationQueue = OperationQueue() 20 | operationQueue.maxConcurrentOperationCount = 1 21 | operationQueue.addOperation(operation1) 22 | operationQueue.addOperation(operation2) 23 | 24 | operationQueue.isSuspended = true 25 | 26 | wait(for: [expect], timeout: 10) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /gcdExamples/gcdExamplesTests/DispatchWorkItemCancelTest.swift: -------------------------------------------------------------------------------- 1 | 2 | import XCTest 3 | 4 | class DispatchWorkItemCancelTest: XCTestCase { 5 | 6 | private let queue = DispatchQueue(label: "DispatchWorkItemTest2") 7 | 8 | func test() { 9 | let expect = expectation(description: "DispatchWorkItemCancel") 10 | expect.expectedFulfillmentCount = 2 11 | 12 | queue.async { 13 | sleep(1) 14 | print("test1") 15 | expect.fulfill() 16 | } 17 | queue.async { 18 | sleep(1) 19 | print("test2") 20 | expect.fulfill() 21 | } 22 | 23 | let item = DispatchWorkItem { 24 | print("test") 25 | } 26 | queue.async(execute: item) 27 | 28 | item.cancel() 29 | 30 | wait(for: [expect], timeout: 10) 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /OperationExamples/OperationExamplesTests/OperationCancelTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | class OperationCancelTest: XCTestCase { 4 | 5 | class OperationA: Operation { 6 | override func main() { 7 | if isCancelled { 8 | return 9 | } 10 | sleep(1) 11 | if isCancelled { 12 | return 13 | } 14 | print("test") 15 | } 16 | } 17 | 18 | func test() { 19 | let expect = expectation(description: "OperationCancelTest") 20 | 21 | let operation = OperationA() 22 | operation.completionBlock = { 23 | expect.fulfill() 24 | } 25 | let operationQueue = OperationQueue() 26 | operationQueue.addOperation(operation) 27 | operation.cancel() 28 | 29 | wait(for: [expect], timeout: 10) 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /OperationExamples/OperationExamplesTests/OperationCountTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | class OperationCountTest: XCTestCase { 4 | 5 | func test() { 6 | let expect = expectation(description: "OperationCountTest") 7 | expect.expectedFulfillmentCount = 3 8 | 9 | let operationQueue = OperationQueue() 10 | operationQueue.maxConcurrentOperationCount = 1 11 | operationQueue.addOperation { 12 | 13 | sleep(1) 14 | print("test1") 15 | expect.fulfill() 16 | } 17 | operationQueue.addOperation { 18 | 19 | sleep(1) 20 | print("test2") 21 | expect.fulfill() 22 | } 23 | operationQueue.addOperation { 24 | 25 | sleep(1) 26 | print("test3") 27 | expect.fulfill() 28 | } 29 | 30 | wait(for: [expect], timeout: 10) 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /MultithreadingExamples/MultithreadingExamplesTests/RecursiveLockTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | class RecursiveLockTest: XCTestCase { 4 | 5 | //MARK: - Test 1 6 | 7 | private var mutex = pthread_mutex_t() 8 | private var attr = pthread_mutexattr_t() 9 | 10 | func test1() { 11 | pthread_mutexattr_init(&attr) 12 | pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE) 13 | pthread_mutex_init(&mutex, &attr) 14 | 15 | pthread_mutex_lock(&mutex) 16 | justMethod1() 17 | pthread_mutex_unlock(&mutex) 18 | } 19 | 20 | func justMethod1() { 21 | pthread_mutex_lock(&mutex) 22 | //Do something 23 | pthread_mutex_unlock(&mutex) 24 | } 25 | 26 | 27 | //MARK: - Test 2 28 | 29 | private let lock = NSRecursiveLock() 30 | 31 | func test2() { 32 | lock.lock() 33 | justMethod2() 34 | lock.unlock() 35 | } 36 | 37 | func justMethod2() { 38 | lock.lock() 39 | //Do something 40 | lock.unlock() 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /OperationExamples/OperationExamplesTests/OperationTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | class OperationTest: XCTestCase { 4 | 5 | class OperationA: Operation { 6 | 7 | override func main() { 8 | print("test") 9 | } 10 | } 11 | 12 | //MARK: - Test 1 13 | 14 | func test1() { 15 | 16 | let expect = expectation(description: "OperationTest1") 17 | let testOperation = OperationA() 18 | testOperation.completionBlock = { 19 | expect.fulfill() 20 | } 21 | let operationQueue = OperationQueue() 22 | operationQueue.addOperation(testOperation) 23 | 24 | wait(for: [expect], timeout: 10) 25 | } 26 | 27 | //MARK: - Test 2 28 | 29 | func test2() { 30 | let expect = expectation(description: "OperationTest2") 31 | 32 | let operationQueue = OperationQueue() 33 | operationQueue.addOperation { 34 | print("test") 35 | expect.fulfill() 36 | } 37 | 38 | wait(for: [expect], timeout: 10) 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /gcdExamples/gcdExamplesTests/AsyncVsSyncSerialTest.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AsyncVsSyncTest1.swift 3 | // gcdExamplesTests 4 | // 5 | // Created by Щукин Алексей on 19/02/2018. 6 | // Copyright © 2018 Alexey Shchukin. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class AsyncVsSyncSerialTest: XCTestCase { 12 | 13 | private let serialQueue = DispatchQueue(label: "serialTest") 14 | 15 | func test() { 16 | let expect = expectation(description: "AsyncVsSyncTestSerial") 17 | expect.expectedFulfillmentCount = 4 18 | 19 | serialQueue.async { 20 | print("test1") 21 | expect.fulfill() 22 | } 23 | 24 | serialQueue.async { 25 | sleep(1) 26 | print("test2") 27 | expect.fulfill() 28 | } 29 | 30 | serialQueue.sync { 31 | print("test3") 32 | expect.fulfill() 33 | } 34 | 35 | serialQueue.sync { 36 | print("test4") 37 | expect.fulfill() 38 | } 39 | 40 | wait(for: [expect], timeout: 10) 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /OperationExamples/OperationExamplesTests/WaitOperationTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | class WaitOperationTest: XCTestCase { 4 | 5 | var operationQueue: OperationQueue! 6 | 7 | override func setUp() { 8 | super.setUp() 9 | operationQueue = OperationQueue() 10 | } 11 | 12 | //MARK: - Test 1 13 | 14 | func test1() { 15 | operationQueue.addOperation { 16 | 17 | sleep(1) 18 | print("test1") 19 | } 20 | operationQueue.addOperation { 21 | 22 | sleep(2) 23 | print("test2") 24 | } 25 | operationQueue.waitUntilAllOperationsAreFinished() 26 | } 27 | 28 | //MARK: - Test 2 29 | 30 | func test2() { 31 | let operation1 = BlockOperation { 32 | 33 | sleep(1) 34 | print("test1") 35 | } 36 | let operation2 = BlockOperation { 37 | 38 | sleep(2) 39 | print("test2") 40 | } 41 | operationQueue.addOperations([operation1, operation2], waitUntilFinished: true) 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /gcdExamples/gcdExamplesTests/AsyncVsSyncConcurrentTest.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AsyncVsSyncTestConcurrent.swift 3 | // gcdExamplesTests 4 | // 5 | // Created by Щукин Алексей on 19/02/2018. 6 | // Copyright © 2018 Alexey Shchukin. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class AsyncVsSyncConcurrentTest: XCTestCase { 12 | 13 | private let concurrentQueue = DispatchQueue.global() 14 | 15 | func test() { 16 | let expect = expectation(description: "AsyncVsSyncTestConcurrent") 17 | expect.expectedFulfillmentCount = 4 18 | 19 | concurrentQueue.async { 20 | print("test1") 21 | expect.fulfill() 22 | } 23 | 24 | concurrentQueue.async { 25 | print("test2") 26 | expect.fulfill() 27 | } 28 | 29 | concurrentQueue.sync { 30 | print("test3") 31 | expect.fulfill() 32 | } 33 | 34 | concurrentQueue.sync { 35 | print("test4") 36 | expect.fulfill() 37 | } 38 | 39 | wait(for: [expect], timeout: 10) 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /MultithreadingExamples/MultithreadingExamplesTests/QosTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | class QosTest: XCTestCase { 4 | 5 | //MARK: - Test 1 6 | 7 | func test1() { 8 | var thread = pthread_t(bitPattern: 0) 9 | var attribute = pthread_attr_t() 10 | pthread_attr_init(&attribute) 11 | pthread_attr_set_qos_class_np(&attribute, QOS_CLASS_USER_INITIATED, 0) 12 | pthread_create(&thread, &attribute, { poiner in 13 | 14 | print("test") 15 | pthread_set_qos_class_self_np(QOS_CLASS_BACKGROUND, 0) 16 | 17 | return nil 18 | }, nil) 19 | } 20 | 21 | //MARK: - Test 2 22 | 23 | func test2() { 24 | let expect = expectation(description: "QosTest") 25 | 26 | let thread = Thread { 27 | 28 | print("test") 29 | print(qos_class_self()) 30 | expect.fulfill() 31 | } 32 | thread.qualityOfService = .userInteractive 33 | thread.start() 34 | 35 | print(qos_class_main()) 36 | 37 | wait(for: [expect], timeout: 10) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /gcdExamples/gcdExamplesTests/DispatchSourceTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | class DispatchSourceTest: XCTestCase { 4 | 5 | //MARK: - Test 1 6 | 7 | func test1() { 8 | let source = DispatchSource.makeTimerSource(queue: DispatchQueue.global()) 9 | 10 | source.setEventHandler { 11 | print("test") 12 | } 13 | source.schedule(deadline: .now(), repeating: 5) 14 | source.activate() 15 | 16 | sleep(10) 17 | } 18 | 19 | //MARK: - Test 2 20 | 21 | private let source = DispatchSource.makeUserDataAddSource(queue: DispatchQueue.main) 22 | 23 | override func setUp() { 24 | super.setUp() 25 | 26 | source.setEventHandler { 27 | print(self.source.data) 28 | } 29 | source.activate() 30 | } 31 | 32 | func test2() { 33 | let expect = expectation(description: "DispatchSourceTest") 34 | 35 | DispatchQueue.global().async { 36 | self.source.add(data: 10) 37 | expect.fulfill() 38 | } 39 | 40 | wait(for: [expect], timeout: 10) 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /gcdExamples/gcdExamplesTests/TargetQueueHierarchyTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | class TargetQueueHierarchyTest: XCTestCase { 4 | 5 | func test() { 6 | let expect = expectation(description: "TargetQueueHierarchyTest") 7 | expect.expectedFulfillmentCount = 2 8 | 9 | let targetQueue = DispatchQueue(label: "TargetQueue") 10 | let queue1 = DispatchQueue(label: "Queue1", target: targetQueue) 11 | let dispatchSource1 = DispatchSource.makeTimerSource(queue: queue1) 12 | dispatchSource1.setEventHandler { 13 | print("test1") 14 | expect.fulfill() 15 | } 16 | dispatchSource1.schedule(deadline: .now() + 1) 17 | dispatchSource1.activate() 18 | 19 | let queue2 = DispatchQueue(label: "Queue2", target: targetQueue) 20 | let dispatchSource2 = DispatchSource.makeTimerSource(queue: queue2) 21 | dispatchSource2.setEventHandler { 22 | print("test2") 23 | expect.fulfill() 24 | } 25 | dispatchSource2.schedule(deadline: .now() + 2) 26 | dispatchSource2.activate() 27 | 28 | wait(for: [expect], timeout: 10) 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /gcdExamples/gcdExamplesTests/DispatchGroupTest.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DispatchGroup.swift 3 | // gcdExamplesTests 4 | // 5 | // Created by Щукин Алексей on 19/02/2018. 6 | // Copyright © 2018 Alexey Shchukin. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class DispatchGroupTest: XCTestCase { 12 | 13 | private var group: DispatchGroup! 14 | private var queue: DispatchQueue! 15 | 16 | override func setUp() { 17 | super.setUp() 18 | 19 | group = DispatchGroup() 20 | queue = DispatchQueue(label: "DispatchGroupTest", attributes: .concurrent) 21 | } 22 | 23 | //MARK: - Test 1 24 | 25 | func test1() { 26 | queue.async(group: group) { 27 | 28 | sleep(1) 29 | print("1") 30 | } 31 | queue.async(group: group) { 32 | 33 | sleep(2) 34 | print("2") 35 | } 36 | group.notify(queue: DispatchQueue.main) { 37 | print("finish all") 38 | } 39 | } 40 | 41 | //MARK: - Test 2 42 | 43 | func test2() { 44 | 45 | group.enter() 46 | queue.async { 47 | sleep(1) 48 | print("1") 49 | self.group.leave() 50 | } 51 | group.enter() 52 | queue.async { 53 | sleep(2) 54 | print("2") 55 | self.group.leave() 56 | } 57 | group.wait() 58 | print("finsh all") 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /gcdExamples/gcdExamplesTests/DispatchBarrierTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | class StorageTest { 4 | 5 | private let queue = DispatchQueue(label: "DispatchBarrierTest", attributes: .concurrent) 6 | 7 | private var internalTest: Int = 0 8 | 9 | func setTest(_ test: Int) { 10 | 11 | queue.async(flags: .barrier) { 12 | self.internalTest = test 13 | } 14 | } 15 | 16 | func test() -> Int{ 17 | 18 | var tmp: Int = 0 19 | queue.sync { 20 | tmp = self.internalTest 21 | } 22 | return tmp 23 | } 24 | } 25 | 26 | class DispatchBarrierTest: XCTestCase { 27 | 28 | func test() { 29 | let expect = expectation(description: "DispatchBarrierTest") 30 | expect.expectedFulfillmentCount = 4 31 | 32 | let storage = StorageTest() 33 | storage.setTest(10) 34 | 35 | DispatchQueue.global().async { 36 | print(storage.test()) 37 | expect.fulfill() 38 | } 39 | 40 | DispatchQueue.global().async { 41 | print(storage.test()) 42 | expect.fulfill() 43 | } 44 | 45 | DispatchQueue.global().async { 46 | storage.setTest(100) 47 | expect.fulfill() 48 | } 49 | 50 | DispatchQueue.global().async { 51 | print(storage.test()) 52 | expect.fulfill() 53 | } 54 | 55 | wait(for: [expect], timeout: 10) 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /OperationExamples/OperationExamplesTests/AsyncOperationTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | class AsyncOperationTest: XCTestCase { 4 | 5 | class AsyncOperation: Operation { 6 | private var finish = false 7 | private var execute = false 8 | private let queue = DispatchQueue(label: "AsyncOperation") 9 | 10 | override var isAsynchronous: Bool { return true } 11 | override var isFinished: Bool { return finish } 12 | override var isExecuting: Bool { return execute } 13 | 14 | override func start() { 15 | willChangeValue(forKey: "isExecuting") 16 | queue.async { 17 | self.main() 18 | } 19 | execute = true 20 | didChangeValue(forKey: "isExecuting") 21 | } 22 | 23 | override func main() { 24 | print("test") 25 | willChangeValue(forKey: "isFinished") 26 | willChangeValue(forKey: "isExecuting") 27 | 28 | finish = true 29 | execute = false 30 | 31 | didChangeValue(forKey: "isFinished") 32 | didChangeValue(forKey: "isExecuting") 33 | } 34 | } 35 | 36 | func test() { 37 | let expect = expectation(description: "AsyncOperationTest") 38 | 39 | let operation = AsyncOperation() 40 | operation.completionBlock = { 41 | expect.fulfill() 42 | } 43 | operation.start() 44 | 45 | wait(for: [expect], timeout: 10) 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /gcdExamples/gcdExamplesTests/DispatchSemaphoreTest.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DispatchSemaphoreTest.swift 3 | // gcdExamplesTests 4 | // 5 | // Created by Щукин Алексей on 19/02/2018. 6 | // Copyright © 2018 Alexey Shchukin. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class DispatchSemaphoreTest: XCTestCase { 12 | 13 | //MARK: - Test 1 14 | 15 | func test1() { 16 | let semaphore = DispatchSemaphore(value: 0) 17 | 18 | DispatchQueue.global().async { 19 | 20 | sleep(3) 21 | print("1") 22 | semaphore.signal() 23 | } 24 | semaphore.wait() 25 | print("2") 26 | } 27 | 28 | //MARK: - Test 2 29 | 30 | private let semaphore = DispatchSemaphore(value: 2) 31 | 32 | private func doWork() { 33 | 34 | semaphore.wait() 35 | print("test") 36 | sleep(3) //Do something 37 | semaphore.signal() 38 | } 39 | 40 | func test2() { 41 | let expect = expectation(description: "DispatchSemaphoreTest") 42 | expect.expectedFulfillmentCount = 3 43 | 44 | DispatchQueue.global().async { 45 | self.doWork() 46 | expect.fulfill() 47 | } 48 | DispatchQueue.global().async { 49 | self.doWork() 50 | expect.fulfill() 51 | } 52 | DispatchQueue.global().async { 53 | self.doWork() 54 | expect.fulfill() 55 | } 56 | 57 | wait(for: [expect], timeout: 10) 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /gcdExamples/gcdExamples/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /OperationExamples/OperationExamples/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /MultithreadingExamples/MultithreadingExamples/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /MultithreadingExamples/MultithreadingExamplesTests/ReadWriteLockTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | class ReadWriteLockTest: XCTestCase { 4 | 5 | class Storage { 6 | private var lock = pthread_rwlock_t() 7 | private var attr = pthread_rwlockattr_t() 8 | 9 | private var test: Int = 0 10 | 11 | init() { 12 | pthread_rwlock_init(&lock, &attr) 13 | } 14 | 15 | var testProperty: Int { 16 | get { 17 | pthread_rwlock_rdlock(&lock) 18 | let tmp = test 19 | pthread_rwlock_unlock(&lock) 20 | return tmp 21 | } 22 | set { 23 | pthread_rwlock_wrlock(&lock) 24 | test = newValue 25 | pthread_rwlock_unlock(&lock) 26 | } 27 | } 28 | } 29 | 30 | func test() { 31 | let expect = expectation(description: "ReadWriteLockTest") 32 | expect.expectedFulfillmentCount = 4 33 | 34 | let storage = Storage() 35 | storage.testProperty = 10 36 | DispatchQueue.global().async { 37 | print(storage.testProperty) 38 | expect.fulfill() 39 | } 40 | DispatchQueue.global().async { 41 | print(storage.testProperty) 42 | expect.fulfill() 43 | } 44 | DispatchQueue.global().async { 45 | storage.testProperty = 100 46 | expect.fulfill() 47 | } 48 | DispatchQueue.global().async { 49 | print(storage.testProperty) 50 | expect.fulfill() 51 | } 52 | 53 | wait(for: [expect], timeout: 10) 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /gcdExamples/gcdExamples/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /OperationExamples/OperationExamples/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /MultithreadingExamples/MultithreadingExamples/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /gcdExamples/gcdExamples/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /OperationExamples/OperationExamples/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /MultithreadingExamples/MultithreadingExamples/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /gcdExamples/gcdExamples/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | } 88 | ], 89 | "info" : { 90 | "version" : 1, 91 | "author" : "xcode" 92 | } 93 | } -------------------------------------------------------------------------------- /OperationExamples/OperationExamples/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | } 88 | ], 89 | "info" : { 90 | "version" : 1, 91 | "author" : "xcode" 92 | } 93 | } -------------------------------------------------------------------------------- /MultithreadingExamples/MultithreadingExamples/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | } 88 | ], 89 | "info" : { 90 | "version" : 1, 91 | "author" : "xcode" 92 | } 93 | } -------------------------------------------------------------------------------- /MultithreadingExamples/MultithreadingExamplesTests/ConditionTest.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ConditionTest.swift 3 | // MultithreadingTestTests 4 | // 5 | // Created by Щукин Алексей on 20/02/2018. 6 | // Copyright © 2018 Alexey Shchukin. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class ConditionTest: XCTestCase { 12 | 13 | //MARK: - Test 1 14 | 15 | private var condition1 = pthread_cond_t() 16 | private var mutex = pthread_mutex_t() 17 | private var check1 = false 18 | var expect: XCTestExpectation! 19 | 20 | func test1() { 21 | expect = expectation(description: "ConditionTest") 22 | pthread_cond_init(&condition1, nil) 23 | pthread_mutex_init(&mutex, nil) 24 | 25 | DispatchQueue.global().async { [weak self] in 26 | self?.justMethod1() 27 | } 28 | 29 | pthread_mutex_lock(&mutex) 30 | check1 = true 31 | pthread_cond_signal(&condition1) 32 | pthread_mutex_unlock(&mutex) 33 | wait(for: [expect], timeout: 10) 34 | } 35 | 36 | func justMethod1() { 37 | pthread_mutex_lock(&mutex) 38 | while !check1 { 39 | pthread_cond_wait(&condition1, &mutex) 40 | } 41 | //Do something 42 | pthread_mutex_unlock(&mutex) 43 | expect.fulfill() 44 | } 45 | 46 | //MARK: - Test 2 47 | 48 | private let condition2 = NSCondition() 49 | private var check2: Bool = false 50 | 51 | func justMethod2() { 52 | condition2.lock() 53 | while(!check2) { 54 | condition2.wait() 55 | } 56 | condition2.unlock() 57 | expect.fulfill() 58 | } 59 | 60 | func test2() { 61 | expect = expectation(description: "ConditionTest") 62 | 63 | DispatchQueue.global().async { [weak self] in 64 | self?.justMethod2() 65 | } 66 | 67 | condition2.lock() 68 | 69 | check2 = true 70 | condition2.signal() 71 | condition2.unlock() 72 | 73 | wait(for: [expect], timeout: 10) 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /gcdExamples/gcdExamples/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // gcdExamples 4 | // 5 | // Created by Щукин Алексей on 19/02/2018. 6 | // Copyright © 2018 Alexey Shchukin. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /OperationExamples/OperationExamples/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // OperationExamples 4 | // 5 | // Created by Щукин Алексей on 19/02/2018. 6 | // Copyright © 2018 Alexey Shchukin. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /MultithreadingExamples/MultithreadingExamples/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // MultithreadingExamples 4 | // 5 | // Created by Щукин Алексей on 20/02/2018. 6 | // Copyright © 2018 Alexey Shchukin. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /OperationExamples/OperationExamples.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 48; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1800E271203C264600CC3933 /* OperationCountTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1800E270203C264600CC3933 /* OperationCountTest.swift */; }; 11 | 1800E273203C274A00CC3933 /* OperationCancelTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1800E272203C274A00CC3933 /* OperationCancelTest.swift */; }; 12 | 1800E275203C2A3900CC3933 /* AsyncOperationTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1800E274203C2A3900CC3933 /* AsyncOperationTest.swift */; }; 13 | 1800E277203C2BC600CC3933 /* DependenciesTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1800E276203C2BC600CC3933 /* DependenciesTest.swift */; }; 14 | 1800E279203C2DB400CC3933 /* WaitOperationTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1800E278203C2DB400CC3933 /* WaitOperationTest.swift */; }; 15 | 1800E27B203C2F0000CC3933 /* OperationSuspendTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1800E27A203C2F0000CC3933 /* OperationSuspendTest.swift */; }; 16 | 18743518203B3ED200D8B795 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18743517203B3ED200D8B795 /* AppDelegate.swift */; }; 17 | 1874351A203B3ED200D8B795 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18743519203B3ED200D8B795 /* ViewController.swift */; }; 18 | 1874351D203B3ED200D8B795 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1874351B203B3ED200D8B795 /* Main.storyboard */; }; 19 | 1874351F203B3ED200D8B795 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1874351E203B3ED200D8B795 /* Assets.xcassets */; }; 20 | 18743522203B3ED200D8B795 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 18743520203B3ED200D8B795 /* LaunchScreen.storyboard */; }; 21 | 18743538203B3F5900D8B795 /* BlockOperationTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18743537203B3F5900D8B795 /* BlockOperationTest.swift */; }; 22 | 1874353A203B400200D8B795 /* OperationTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18743539203B400200D8B795 /* OperationTest.swift */; }; 23 | /* End PBXBuildFile section */ 24 | 25 | /* Begin PBXContainerItemProxy section */ 26 | 18743529203B3ED200D8B795 /* PBXContainerItemProxy */ = { 27 | isa = PBXContainerItemProxy; 28 | containerPortal = 1874350C203B3ED200D8B795 /* Project object */; 29 | proxyType = 1; 30 | remoteGlobalIDString = 18743513203B3ED200D8B795; 31 | remoteInfo = OperationExamples; 32 | }; 33 | /* End PBXContainerItemProxy section */ 34 | 35 | /* Begin PBXFileReference section */ 36 | 1800E270203C264600CC3933 /* OperationCountTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OperationCountTest.swift; sourceTree = ""; }; 37 | 1800E272203C274A00CC3933 /* OperationCancelTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OperationCancelTest.swift; sourceTree = ""; }; 38 | 1800E274203C2A3900CC3933 /* AsyncOperationTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AsyncOperationTest.swift; sourceTree = ""; }; 39 | 1800E276203C2BC600CC3933 /* DependenciesTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DependenciesTest.swift; sourceTree = ""; }; 40 | 1800E278203C2DB400CC3933 /* WaitOperationTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WaitOperationTest.swift; sourceTree = ""; }; 41 | 1800E27A203C2F0000CC3933 /* OperationSuspendTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OperationSuspendTest.swift; sourceTree = ""; }; 42 | 18743514203B3ED200D8B795 /* OperationExamples.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OperationExamples.app; sourceTree = BUILT_PRODUCTS_DIR; }; 43 | 18743517203B3ED200D8B795 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 44 | 18743519203B3ED200D8B795 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 45 | 1874351C203B3ED200D8B795 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 46 | 1874351E203B3ED200D8B795 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 47 | 18743521203B3ED200D8B795 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 48 | 18743523203B3ED200D8B795 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 49 | 18743528203B3ED200D8B795 /* OperationExamplesTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = OperationExamplesTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | 1874352E203B3ED200D8B795 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 51 | 18743537203B3F5900D8B795 /* BlockOperationTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlockOperationTest.swift; sourceTree = ""; }; 52 | 18743539203B400200D8B795 /* OperationTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OperationTest.swift; sourceTree = ""; }; 53 | /* End PBXFileReference section */ 54 | 55 | /* Begin PBXFrameworksBuildPhase section */ 56 | 18743511203B3ED200D8B795 /* Frameworks */ = { 57 | isa = PBXFrameworksBuildPhase; 58 | buildActionMask = 2147483647; 59 | files = ( 60 | ); 61 | runOnlyForDeploymentPostprocessing = 0; 62 | }; 63 | 18743525203B3ED200D8B795 /* Frameworks */ = { 64 | isa = PBXFrameworksBuildPhase; 65 | buildActionMask = 2147483647; 66 | files = ( 67 | ); 68 | runOnlyForDeploymentPostprocessing = 0; 69 | }; 70 | /* End PBXFrameworksBuildPhase section */ 71 | 72 | /* Begin PBXGroup section */ 73 | 1874350B203B3ED200D8B795 = { 74 | isa = PBXGroup; 75 | children = ( 76 | 18743516203B3ED200D8B795 /* OperationExamples */, 77 | 1874352B203B3ED200D8B795 /* OperationExamplesTests */, 78 | 18743515203B3ED200D8B795 /* Products */, 79 | ); 80 | sourceTree = ""; 81 | }; 82 | 18743515203B3ED200D8B795 /* Products */ = { 83 | isa = PBXGroup; 84 | children = ( 85 | 18743514203B3ED200D8B795 /* OperationExamples.app */, 86 | 18743528203B3ED200D8B795 /* OperationExamplesTests.xctest */, 87 | ); 88 | name = Products; 89 | sourceTree = ""; 90 | }; 91 | 18743516203B3ED200D8B795 /* OperationExamples */ = { 92 | isa = PBXGroup; 93 | children = ( 94 | 18743517203B3ED200D8B795 /* AppDelegate.swift */, 95 | 18743519203B3ED200D8B795 /* ViewController.swift */, 96 | 1874351B203B3ED200D8B795 /* Main.storyboard */, 97 | 1874351E203B3ED200D8B795 /* Assets.xcassets */, 98 | 18743520203B3ED200D8B795 /* LaunchScreen.storyboard */, 99 | 18743523203B3ED200D8B795 /* Info.plist */, 100 | ); 101 | path = OperationExamples; 102 | sourceTree = ""; 103 | }; 104 | 1874352B203B3ED200D8B795 /* OperationExamplesTests */ = { 105 | isa = PBXGroup; 106 | children = ( 107 | 1874352E203B3ED200D8B795 /* Info.plist */, 108 | 18743537203B3F5900D8B795 /* BlockOperationTest.swift */, 109 | 18743539203B400200D8B795 /* OperationTest.swift */, 110 | 1800E270203C264600CC3933 /* OperationCountTest.swift */, 111 | 1800E272203C274A00CC3933 /* OperationCancelTest.swift */, 112 | 1800E274203C2A3900CC3933 /* AsyncOperationTest.swift */, 113 | 1800E276203C2BC600CC3933 /* DependenciesTest.swift */, 114 | 1800E278203C2DB400CC3933 /* WaitOperationTest.swift */, 115 | 1800E27A203C2F0000CC3933 /* OperationSuspendTest.swift */, 116 | ); 117 | path = OperationExamplesTests; 118 | sourceTree = ""; 119 | }; 120 | /* End PBXGroup section */ 121 | 122 | /* Begin PBXNativeTarget section */ 123 | 18743513203B3ED200D8B795 /* OperationExamples */ = { 124 | isa = PBXNativeTarget; 125 | buildConfigurationList = 18743531203B3ED200D8B795 /* Build configuration list for PBXNativeTarget "OperationExamples" */; 126 | buildPhases = ( 127 | 18743510203B3ED200D8B795 /* Sources */, 128 | 18743511203B3ED200D8B795 /* Frameworks */, 129 | 18743512203B3ED200D8B795 /* Resources */, 130 | ); 131 | buildRules = ( 132 | ); 133 | dependencies = ( 134 | ); 135 | name = OperationExamples; 136 | productName = OperationExamples; 137 | productReference = 18743514203B3ED200D8B795 /* OperationExamples.app */; 138 | productType = "com.apple.product-type.application"; 139 | }; 140 | 18743527203B3ED200D8B795 /* OperationExamplesTests */ = { 141 | isa = PBXNativeTarget; 142 | buildConfigurationList = 18743534203B3ED200D8B795 /* Build configuration list for PBXNativeTarget "OperationExamplesTests" */; 143 | buildPhases = ( 144 | 18743524203B3ED200D8B795 /* Sources */, 145 | 18743525203B3ED200D8B795 /* Frameworks */, 146 | 18743526203B3ED200D8B795 /* Resources */, 147 | ); 148 | buildRules = ( 149 | ); 150 | dependencies = ( 151 | 1874352A203B3ED200D8B795 /* PBXTargetDependency */, 152 | ); 153 | name = OperationExamplesTests; 154 | productName = OperationExamplesTests; 155 | productReference = 18743528203B3ED200D8B795 /* OperationExamplesTests.xctest */; 156 | productType = "com.apple.product-type.bundle.unit-test"; 157 | }; 158 | /* End PBXNativeTarget section */ 159 | 160 | /* Begin PBXProject section */ 161 | 1874350C203B3ED200D8B795 /* Project object */ = { 162 | isa = PBXProject; 163 | attributes = { 164 | LastSwiftUpdateCheck = 0920; 165 | LastUpgradeCheck = 0920; 166 | ORGANIZATIONNAME = "Alexey Shchukin"; 167 | TargetAttributes = { 168 | 18743513203B3ED200D8B795 = { 169 | CreatedOnToolsVersion = 9.2; 170 | ProvisioningStyle = Automatic; 171 | }; 172 | 18743527203B3ED200D8B795 = { 173 | CreatedOnToolsVersion = 9.2; 174 | LastSwiftMigration = 0920; 175 | ProvisioningStyle = Automatic; 176 | TestTargetID = 18743513203B3ED200D8B795; 177 | }; 178 | }; 179 | }; 180 | buildConfigurationList = 1874350F203B3ED200D8B795 /* Build configuration list for PBXProject "OperationExamples" */; 181 | compatibilityVersion = "Xcode 8.0"; 182 | developmentRegion = en; 183 | hasScannedForEncodings = 0; 184 | knownRegions = ( 185 | en, 186 | Base, 187 | ); 188 | mainGroup = 1874350B203B3ED200D8B795; 189 | productRefGroup = 18743515203B3ED200D8B795 /* Products */; 190 | projectDirPath = ""; 191 | projectRoot = ""; 192 | targets = ( 193 | 18743513203B3ED200D8B795 /* OperationExamples */, 194 | 18743527203B3ED200D8B795 /* OperationExamplesTests */, 195 | ); 196 | }; 197 | /* End PBXProject section */ 198 | 199 | /* Begin PBXResourcesBuildPhase section */ 200 | 18743512203B3ED200D8B795 /* Resources */ = { 201 | isa = PBXResourcesBuildPhase; 202 | buildActionMask = 2147483647; 203 | files = ( 204 | 18743522203B3ED200D8B795 /* LaunchScreen.storyboard in Resources */, 205 | 1874351F203B3ED200D8B795 /* Assets.xcassets in Resources */, 206 | 1874351D203B3ED200D8B795 /* Main.storyboard in Resources */, 207 | ); 208 | runOnlyForDeploymentPostprocessing = 0; 209 | }; 210 | 18743526203B3ED200D8B795 /* Resources */ = { 211 | isa = PBXResourcesBuildPhase; 212 | buildActionMask = 2147483647; 213 | files = ( 214 | ); 215 | runOnlyForDeploymentPostprocessing = 0; 216 | }; 217 | /* End PBXResourcesBuildPhase section */ 218 | 219 | /* Begin PBXSourcesBuildPhase section */ 220 | 18743510203B3ED200D8B795 /* Sources */ = { 221 | isa = PBXSourcesBuildPhase; 222 | buildActionMask = 2147483647; 223 | files = ( 224 | 1874351A203B3ED200D8B795 /* ViewController.swift in Sources */, 225 | 18743518203B3ED200D8B795 /* AppDelegate.swift in Sources */, 226 | ); 227 | runOnlyForDeploymentPostprocessing = 0; 228 | }; 229 | 18743524203B3ED200D8B795 /* Sources */ = { 230 | isa = PBXSourcesBuildPhase; 231 | buildActionMask = 2147483647; 232 | files = ( 233 | 1800E27B203C2F0000CC3933 /* OperationSuspendTest.swift in Sources */, 234 | 1800E277203C2BC600CC3933 /* DependenciesTest.swift in Sources */, 235 | 1800E279203C2DB400CC3933 /* WaitOperationTest.swift in Sources */, 236 | 18743538203B3F5900D8B795 /* BlockOperationTest.swift in Sources */, 237 | 1800E271203C264600CC3933 /* OperationCountTest.swift in Sources */, 238 | 1874353A203B400200D8B795 /* OperationTest.swift in Sources */, 239 | 1800E275203C2A3900CC3933 /* AsyncOperationTest.swift in Sources */, 240 | 1800E273203C274A00CC3933 /* OperationCancelTest.swift in Sources */, 241 | ); 242 | runOnlyForDeploymentPostprocessing = 0; 243 | }; 244 | /* End PBXSourcesBuildPhase section */ 245 | 246 | /* Begin PBXTargetDependency section */ 247 | 1874352A203B3ED200D8B795 /* PBXTargetDependency */ = { 248 | isa = PBXTargetDependency; 249 | target = 18743513203B3ED200D8B795 /* OperationExamples */; 250 | targetProxy = 18743529203B3ED200D8B795 /* PBXContainerItemProxy */; 251 | }; 252 | /* End PBXTargetDependency section */ 253 | 254 | /* Begin PBXVariantGroup section */ 255 | 1874351B203B3ED200D8B795 /* Main.storyboard */ = { 256 | isa = PBXVariantGroup; 257 | children = ( 258 | 1874351C203B3ED200D8B795 /* Base */, 259 | ); 260 | name = Main.storyboard; 261 | sourceTree = ""; 262 | }; 263 | 18743520203B3ED200D8B795 /* LaunchScreen.storyboard */ = { 264 | isa = PBXVariantGroup; 265 | children = ( 266 | 18743521203B3ED200D8B795 /* Base */, 267 | ); 268 | name = LaunchScreen.storyboard; 269 | sourceTree = ""; 270 | }; 271 | /* End PBXVariantGroup section */ 272 | 273 | /* Begin XCBuildConfiguration section */ 274 | 1874352F203B3ED200D8B795 /* Debug */ = { 275 | isa = XCBuildConfiguration; 276 | buildSettings = { 277 | ALWAYS_SEARCH_USER_PATHS = NO; 278 | CLANG_ANALYZER_NONNULL = YES; 279 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 280 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 281 | CLANG_CXX_LIBRARY = "libc++"; 282 | CLANG_ENABLE_MODULES = YES; 283 | CLANG_ENABLE_OBJC_ARC = YES; 284 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 285 | CLANG_WARN_BOOL_CONVERSION = YES; 286 | CLANG_WARN_COMMA = YES; 287 | CLANG_WARN_CONSTANT_CONVERSION = YES; 288 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 289 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 290 | CLANG_WARN_EMPTY_BODY = YES; 291 | CLANG_WARN_ENUM_CONVERSION = YES; 292 | CLANG_WARN_INFINITE_RECURSION = YES; 293 | CLANG_WARN_INT_CONVERSION = YES; 294 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 295 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 296 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 297 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 298 | CLANG_WARN_STRICT_PROTOTYPES = YES; 299 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 300 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 301 | CLANG_WARN_UNREACHABLE_CODE = YES; 302 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 303 | CODE_SIGN_IDENTITY = "iPhone Developer"; 304 | COPY_PHASE_STRIP = NO; 305 | DEBUG_INFORMATION_FORMAT = dwarf; 306 | ENABLE_STRICT_OBJC_MSGSEND = YES; 307 | ENABLE_TESTABILITY = YES; 308 | GCC_C_LANGUAGE_STANDARD = gnu11; 309 | GCC_DYNAMIC_NO_PIC = NO; 310 | GCC_NO_COMMON_BLOCKS = YES; 311 | GCC_OPTIMIZATION_LEVEL = 0; 312 | GCC_PREPROCESSOR_DEFINITIONS = ( 313 | "DEBUG=1", 314 | "$(inherited)", 315 | ); 316 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 317 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 318 | GCC_WARN_UNDECLARED_SELECTOR = YES; 319 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 320 | GCC_WARN_UNUSED_FUNCTION = YES; 321 | GCC_WARN_UNUSED_VARIABLE = YES; 322 | IPHONEOS_DEPLOYMENT_TARGET = 11.2; 323 | MTL_ENABLE_DEBUG_INFO = YES; 324 | ONLY_ACTIVE_ARCH = YES; 325 | SDKROOT = iphoneos; 326 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 327 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 328 | }; 329 | name = Debug; 330 | }; 331 | 18743530203B3ED200D8B795 /* Release */ = { 332 | isa = XCBuildConfiguration; 333 | buildSettings = { 334 | ALWAYS_SEARCH_USER_PATHS = NO; 335 | CLANG_ANALYZER_NONNULL = YES; 336 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 337 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 338 | CLANG_CXX_LIBRARY = "libc++"; 339 | CLANG_ENABLE_MODULES = YES; 340 | CLANG_ENABLE_OBJC_ARC = YES; 341 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 342 | CLANG_WARN_BOOL_CONVERSION = YES; 343 | CLANG_WARN_COMMA = YES; 344 | CLANG_WARN_CONSTANT_CONVERSION = YES; 345 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 346 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 347 | CLANG_WARN_EMPTY_BODY = YES; 348 | CLANG_WARN_ENUM_CONVERSION = YES; 349 | CLANG_WARN_INFINITE_RECURSION = YES; 350 | CLANG_WARN_INT_CONVERSION = YES; 351 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 352 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 353 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 354 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 355 | CLANG_WARN_STRICT_PROTOTYPES = YES; 356 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 357 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 358 | CLANG_WARN_UNREACHABLE_CODE = YES; 359 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 360 | CODE_SIGN_IDENTITY = "iPhone Developer"; 361 | COPY_PHASE_STRIP = NO; 362 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 363 | ENABLE_NS_ASSERTIONS = NO; 364 | ENABLE_STRICT_OBJC_MSGSEND = YES; 365 | GCC_C_LANGUAGE_STANDARD = gnu11; 366 | GCC_NO_COMMON_BLOCKS = YES; 367 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 368 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 369 | GCC_WARN_UNDECLARED_SELECTOR = YES; 370 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 371 | GCC_WARN_UNUSED_FUNCTION = YES; 372 | GCC_WARN_UNUSED_VARIABLE = YES; 373 | IPHONEOS_DEPLOYMENT_TARGET = 11.2; 374 | MTL_ENABLE_DEBUG_INFO = NO; 375 | SDKROOT = iphoneos; 376 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 377 | VALIDATE_PRODUCT = YES; 378 | }; 379 | name = Release; 380 | }; 381 | 18743532203B3ED200D8B795 /* Debug */ = { 382 | isa = XCBuildConfiguration; 383 | buildSettings = { 384 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 385 | CODE_SIGN_STYLE = Automatic; 386 | DEVELOPMENT_TEAM = PDTXSYFVEX; 387 | INFOPLIST_FILE = OperationExamples/Info.plist; 388 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 389 | PRODUCT_BUNDLE_IDENTIFIER = as.OperationExamples; 390 | PRODUCT_NAME = "$(TARGET_NAME)"; 391 | SWIFT_VERSION = 4.0; 392 | TARGETED_DEVICE_FAMILY = "1,2"; 393 | }; 394 | name = Debug; 395 | }; 396 | 18743533203B3ED200D8B795 /* Release */ = { 397 | isa = XCBuildConfiguration; 398 | buildSettings = { 399 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 400 | CODE_SIGN_STYLE = Automatic; 401 | DEVELOPMENT_TEAM = PDTXSYFVEX; 402 | INFOPLIST_FILE = OperationExamples/Info.plist; 403 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 404 | PRODUCT_BUNDLE_IDENTIFIER = as.OperationExamples; 405 | PRODUCT_NAME = "$(TARGET_NAME)"; 406 | SWIFT_VERSION = 4.0; 407 | TARGETED_DEVICE_FAMILY = "1,2"; 408 | }; 409 | name = Release; 410 | }; 411 | 18743535203B3ED200D8B795 /* Debug */ = { 412 | isa = XCBuildConfiguration; 413 | buildSettings = { 414 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 415 | BUNDLE_LOADER = "$(TEST_HOST)"; 416 | CLANG_ENABLE_MODULES = YES; 417 | CODE_SIGN_STYLE = Automatic; 418 | DEVELOPMENT_TEAM = PDTXSYFVEX; 419 | INFOPLIST_FILE = OperationExamplesTests/Info.plist; 420 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 421 | PRODUCT_BUNDLE_IDENTIFIER = as.OperationExamplesTests; 422 | PRODUCT_NAME = "$(TARGET_NAME)"; 423 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 424 | SWIFT_VERSION = 4.0; 425 | TARGETED_DEVICE_FAMILY = "1,2"; 426 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/OperationExamples.app/OperationExamples"; 427 | }; 428 | name = Debug; 429 | }; 430 | 18743536203B3ED200D8B795 /* Release */ = { 431 | isa = XCBuildConfiguration; 432 | buildSettings = { 433 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 434 | BUNDLE_LOADER = "$(TEST_HOST)"; 435 | CLANG_ENABLE_MODULES = YES; 436 | CODE_SIGN_STYLE = Automatic; 437 | DEVELOPMENT_TEAM = PDTXSYFVEX; 438 | INFOPLIST_FILE = OperationExamplesTests/Info.plist; 439 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 440 | PRODUCT_BUNDLE_IDENTIFIER = as.OperationExamplesTests; 441 | PRODUCT_NAME = "$(TARGET_NAME)"; 442 | SWIFT_VERSION = 4.0; 443 | TARGETED_DEVICE_FAMILY = "1,2"; 444 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/OperationExamples.app/OperationExamples"; 445 | }; 446 | name = Release; 447 | }; 448 | /* End XCBuildConfiguration section */ 449 | 450 | /* Begin XCConfigurationList section */ 451 | 1874350F203B3ED200D8B795 /* Build configuration list for PBXProject "OperationExamples" */ = { 452 | isa = XCConfigurationList; 453 | buildConfigurations = ( 454 | 1874352F203B3ED200D8B795 /* Debug */, 455 | 18743530203B3ED200D8B795 /* Release */, 456 | ); 457 | defaultConfigurationIsVisible = 0; 458 | defaultConfigurationName = Release; 459 | }; 460 | 18743531203B3ED200D8B795 /* Build configuration list for PBXNativeTarget "OperationExamples" */ = { 461 | isa = XCConfigurationList; 462 | buildConfigurations = ( 463 | 18743532203B3ED200D8B795 /* Debug */, 464 | 18743533203B3ED200D8B795 /* Release */, 465 | ); 466 | defaultConfigurationIsVisible = 0; 467 | defaultConfigurationName = Release; 468 | }; 469 | 18743534203B3ED200D8B795 /* Build configuration list for PBXNativeTarget "OperationExamplesTests" */ = { 470 | isa = XCConfigurationList; 471 | buildConfigurations = ( 472 | 18743535203B3ED200D8B795 /* Debug */, 473 | 18743536203B3ED200D8B795 /* Release */, 474 | ); 475 | defaultConfigurationIsVisible = 0; 476 | defaultConfigurationName = Release; 477 | }; 478 | /* End XCConfigurationList section */ 479 | }; 480 | rootObject = 1874350C203B3ED200D8B795 /* Project object */; 481 | } 482 | -------------------------------------------------------------------------------- /MultithreadingExamples/MultithreadingExamples.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 48; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1800E2C9203C849C00CC3933 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1800E2C8203C849C00CC3933 /* AppDelegate.swift */; }; 11 | 1800E2CB203C849C00CC3933 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1800E2CA203C849C00CC3933 /* ViewController.swift */; }; 12 | 1800E2CE203C849C00CC3933 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1800E2CC203C849C00CC3933 /* Main.storyboard */; }; 13 | 1800E2D0203C849C00CC3933 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1800E2CF203C849C00CC3933 /* Assets.xcassets */; }; 14 | 1800E2D3203C849C00CC3933 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1800E2D1203C849C00CC3933 /* LaunchScreen.storyboard */; }; 15 | 1800E2F2203C86AF00CC3933 /* ReadWriteLockTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1800E2E8203C86AE00CC3933 /* ReadWriteLockTest.swift */; }; 16 | 1800E2F3203C86AF00CC3933 /* SynchronizedTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1800E2E9203C86AE00CC3933 /* SynchronizedTest.swift */; }; 17 | 1800E2F4203C86AF00CC3933 /* AtomicOperationsTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1800E2EA203C86AE00CC3933 /* AtomicOperationsTest.swift */; }; 18 | 1800E2F5203C86AF00CC3933 /* ConditionTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1800E2EB203C86AE00CC3933 /* ConditionTest.swift */; }; 19 | 1800E2F6203C86AF00CC3933 /* SpinLockTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1800E2EC203C86AF00CC3933 /* SpinLockTest.swift */; }; 20 | 1800E2F7203C86AF00CC3933 /* LockTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1800E2ED203C86AF00CC3933 /* LockTest.swift */; }; 21 | 1800E2F8203C86AF00CC3933 /* RecursiveLockTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1800E2EE203C86AF00CC3933 /* RecursiveLockTest.swift */; }; 22 | 1800E2F9203C86AF00CC3933 /* UnfairLockTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1800E2EF203C86AF00CC3933 /* UnfairLockTest.swift */; }; 23 | 1800E2FA203C86AF00CC3933 /* ThreadTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1800E2F0203C86AF00CC3933 /* ThreadTest.swift */; }; 24 | 1800E2FB203C86AF00CC3933 /* QosTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1800E2F1203C86AF00CC3933 /* QosTest.swift */; }; 25 | /* End PBXBuildFile section */ 26 | 27 | /* Begin PBXContainerItemProxy section */ 28 | 1800E2DA203C849D00CC3933 /* PBXContainerItemProxy */ = { 29 | isa = PBXContainerItemProxy; 30 | containerPortal = 1800E2BD203C849C00CC3933 /* Project object */; 31 | proxyType = 1; 32 | remoteGlobalIDString = 1800E2C4203C849C00CC3933; 33 | remoteInfo = MultithreadingExamples; 34 | }; 35 | /* End PBXContainerItemProxy section */ 36 | 37 | /* Begin PBXFileReference section */ 38 | 1800E2C5203C849C00CC3933 /* MultithreadingExamples.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MultithreadingExamples.app; sourceTree = BUILT_PRODUCTS_DIR; }; 39 | 1800E2C8203C849C00CC3933 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 40 | 1800E2CA203C849C00CC3933 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 41 | 1800E2CD203C849C00CC3933 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 42 | 1800E2CF203C849C00CC3933 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 43 | 1800E2D2203C849C00CC3933 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 44 | 1800E2D4203C849C00CC3933 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 45 | 1800E2D9203C849D00CC3933 /* MultithreadingExamplesTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MultithreadingExamplesTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 46 | 1800E2DF203C849D00CC3933 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 47 | 1800E2E8203C86AE00CC3933 /* ReadWriteLockTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReadWriteLockTest.swift; sourceTree = ""; }; 48 | 1800E2E9203C86AE00CC3933 /* SynchronizedTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SynchronizedTest.swift; sourceTree = ""; }; 49 | 1800E2EA203C86AE00CC3933 /* AtomicOperationsTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AtomicOperationsTest.swift; sourceTree = ""; }; 50 | 1800E2EB203C86AE00CC3933 /* ConditionTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConditionTest.swift; sourceTree = ""; }; 51 | 1800E2EC203C86AF00CC3933 /* SpinLockTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpinLockTest.swift; sourceTree = ""; }; 52 | 1800E2ED203C86AF00CC3933 /* LockTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LockTest.swift; sourceTree = ""; }; 53 | 1800E2EE203C86AF00CC3933 /* RecursiveLockTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RecursiveLockTest.swift; sourceTree = ""; }; 54 | 1800E2EF203C86AF00CC3933 /* UnfairLockTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UnfairLockTest.swift; sourceTree = ""; }; 55 | 1800E2F0203C86AF00CC3933 /* ThreadTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ThreadTest.swift; sourceTree = ""; }; 56 | 1800E2F1203C86AF00CC3933 /* QosTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QosTest.swift; sourceTree = ""; }; 57 | /* End PBXFileReference section */ 58 | 59 | /* Begin PBXFrameworksBuildPhase section */ 60 | 1800E2C2203C849C00CC3933 /* Frameworks */ = { 61 | isa = PBXFrameworksBuildPhase; 62 | buildActionMask = 2147483647; 63 | files = ( 64 | ); 65 | runOnlyForDeploymentPostprocessing = 0; 66 | }; 67 | 1800E2D6203C849D00CC3933 /* Frameworks */ = { 68 | isa = PBXFrameworksBuildPhase; 69 | buildActionMask = 2147483647; 70 | files = ( 71 | ); 72 | runOnlyForDeploymentPostprocessing = 0; 73 | }; 74 | /* End PBXFrameworksBuildPhase section */ 75 | 76 | /* Begin PBXGroup section */ 77 | 1800E2BC203C849C00CC3933 = { 78 | isa = PBXGroup; 79 | children = ( 80 | 1800E2C7203C849C00CC3933 /* MultithreadingExamples */, 81 | 1800E2DC203C849D00CC3933 /* MultithreadingExamplesTests */, 82 | 1800E2C6203C849C00CC3933 /* Products */, 83 | ); 84 | sourceTree = ""; 85 | }; 86 | 1800E2C6203C849C00CC3933 /* Products */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 1800E2C5203C849C00CC3933 /* MultithreadingExamples.app */, 90 | 1800E2D9203C849D00CC3933 /* MultithreadingExamplesTests.xctest */, 91 | ); 92 | name = Products; 93 | sourceTree = ""; 94 | }; 95 | 1800E2C7203C849C00CC3933 /* MultithreadingExamples */ = { 96 | isa = PBXGroup; 97 | children = ( 98 | 1800E2C8203C849C00CC3933 /* AppDelegate.swift */, 99 | 1800E2CA203C849C00CC3933 /* ViewController.swift */, 100 | 1800E2CC203C849C00CC3933 /* Main.storyboard */, 101 | 1800E2CF203C849C00CC3933 /* Assets.xcassets */, 102 | 1800E2D1203C849C00CC3933 /* LaunchScreen.storyboard */, 103 | 1800E2D4203C849C00CC3933 /* Info.plist */, 104 | ); 105 | path = MultithreadingExamples; 106 | sourceTree = ""; 107 | }; 108 | 1800E2DC203C849D00CC3933 /* MultithreadingExamplesTests */ = { 109 | isa = PBXGroup; 110 | children = ( 111 | 1800E2DF203C849D00CC3933 /* Info.plist */, 112 | 1800E2F0203C86AF00CC3933 /* ThreadTest.swift */, 113 | 1800E2F1203C86AF00CC3933 /* QosTest.swift */, 114 | 1800E2ED203C86AF00CC3933 /* LockTest.swift */, 115 | 1800E2EE203C86AF00CC3933 /* RecursiveLockTest.swift */, 116 | 1800E2EB203C86AE00CC3933 /* ConditionTest.swift */, 117 | 1800E2E8203C86AE00CC3933 /* ReadWriteLockTest.swift */, 118 | 1800E2EC203C86AF00CC3933 /* SpinLockTest.swift */, 119 | 1800E2E9203C86AE00CC3933 /* SynchronizedTest.swift */, 120 | 1800E2EF203C86AF00CC3933 /* UnfairLockTest.swift */, 121 | 1800E2EA203C86AE00CC3933 /* AtomicOperationsTest.swift */, 122 | ); 123 | path = MultithreadingExamplesTests; 124 | sourceTree = ""; 125 | }; 126 | /* End PBXGroup section */ 127 | 128 | /* Begin PBXNativeTarget section */ 129 | 1800E2C4203C849C00CC3933 /* MultithreadingExamples */ = { 130 | isa = PBXNativeTarget; 131 | buildConfigurationList = 1800E2E2203C849D00CC3933 /* Build configuration list for PBXNativeTarget "MultithreadingExamples" */; 132 | buildPhases = ( 133 | 1800E2C1203C849C00CC3933 /* Sources */, 134 | 1800E2C2203C849C00CC3933 /* Frameworks */, 135 | 1800E2C3203C849C00CC3933 /* Resources */, 136 | ); 137 | buildRules = ( 138 | ); 139 | dependencies = ( 140 | ); 141 | name = MultithreadingExamples; 142 | productName = MultithreadingExamples; 143 | productReference = 1800E2C5203C849C00CC3933 /* MultithreadingExamples.app */; 144 | productType = "com.apple.product-type.application"; 145 | }; 146 | 1800E2D8203C849D00CC3933 /* MultithreadingExamplesTests */ = { 147 | isa = PBXNativeTarget; 148 | buildConfigurationList = 1800E2E5203C849D00CC3933 /* Build configuration list for PBXNativeTarget "MultithreadingExamplesTests" */; 149 | buildPhases = ( 150 | 1800E2D5203C849D00CC3933 /* Sources */, 151 | 1800E2D6203C849D00CC3933 /* Frameworks */, 152 | 1800E2D7203C849D00CC3933 /* Resources */, 153 | ); 154 | buildRules = ( 155 | ); 156 | dependencies = ( 157 | 1800E2DB203C849D00CC3933 /* PBXTargetDependency */, 158 | ); 159 | name = MultithreadingExamplesTests; 160 | productName = MultithreadingExamplesTests; 161 | productReference = 1800E2D9203C849D00CC3933 /* MultithreadingExamplesTests.xctest */; 162 | productType = "com.apple.product-type.bundle.unit-test"; 163 | }; 164 | /* End PBXNativeTarget section */ 165 | 166 | /* Begin PBXProject section */ 167 | 1800E2BD203C849C00CC3933 /* Project object */ = { 168 | isa = PBXProject; 169 | attributes = { 170 | LastSwiftUpdateCheck = 0920; 171 | LastUpgradeCheck = 0920; 172 | ORGANIZATIONNAME = "Alexey Shchukin"; 173 | TargetAttributes = { 174 | 1800E2C4203C849C00CC3933 = { 175 | CreatedOnToolsVersion = 9.2; 176 | ProvisioningStyle = Automatic; 177 | }; 178 | 1800E2D8203C849D00CC3933 = { 179 | CreatedOnToolsVersion = 9.2; 180 | ProvisioningStyle = Automatic; 181 | TestTargetID = 1800E2C4203C849C00CC3933; 182 | }; 183 | }; 184 | }; 185 | buildConfigurationList = 1800E2C0203C849C00CC3933 /* Build configuration list for PBXProject "MultithreadingExamples" */; 186 | compatibilityVersion = "Xcode 8.0"; 187 | developmentRegion = en; 188 | hasScannedForEncodings = 0; 189 | knownRegions = ( 190 | en, 191 | Base, 192 | ); 193 | mainGroup = 1800E2BC203C849C00CC3933; 194 | productRefGroup = 1800E2C6203C849C00CC3933 /* Products */; 195 | projectDirPath = ""; 196 | projectRoot = ""; 197 | targets = ( 198 | 1800E2C4203C849C00CC3933 /* MultithreadingExamples */, 199 | 1800E2D8203C849D00CC3933 /* MultithreadingExamplesTests */, 200 | ); 201 | }; 202 | /* End PBXProject section */ 203 | 204 | /* Begin PBXResourcesBuildPhase section */ 205 | 1800E2C3203C849C00CC3933 /* Resources */ = { 206 | isa = PBXResourcesBuildPhase; 207 | buildActionMask = 2147483647; 208 | files = ( 209 | 1800E2D3203C849C00CC3933 /* LaunchScreen.storyboard in Resources */, 210 | 1800E2D0203C849C00CC3933 /* Assets.xcassets in Resources */, 211 | 1800E2CE203C849C00CC3933 /* Main.storyboard in Resources */, 212 | ); 213 | runOnlyForDeploymentPostprocessing = 0; 214 | }; 215 | 1800E2D7203C849D00CC3933 /* Resources */ = { 216 | isa = PBXResourcesBuildPhase; 217 | buildActionMask = 2147483647; 218 | files = ( 219 | ); 220 | runOnlyForDeploymentPostprocessing = 0; 221 | }; 222 | /* End PBXResourcesBuildPhase section */ 223 | 224 | /* Begin PBXSourcesBuildPhase section */ 225 | 1800E2C1203C849C00CC3933 /* Sources */ = { 226 | isa = PBXSourcesBuildPhase; 227 | buildActionMask = 2147483647; 228 | files = ( 229 | 1800E2CB203C849C00CC3933 /* ViewController.swift in Sources */, 230 | 1800E2C9203C849C00CC3933 /* AppDelegate.swift in Sources */, 231 | ); 232 | runOnlyForDeploymentPostprocessing = 0; 233 | }; 234 | 1800E2D5203C849D00CC3933 /* Sources */ = { 235 | isa = PBXSourcesBuildPhase; 236 | buildActionMask = 2147483647; 237 | files = ( 238 | 1800E2F3203C86AF00CC3933 /* SynchronizedTest.swift in Sources */, 239 | 1800E2F7203C86AF00CC3933 /* LockTest.swift in Sources */, 240 | 1800E2F5203C86AF00CC3933 /* ConditionTest.swift in Sources */, 241 | 1800E2F8203C86AF00CC3933 /* RecursiveLockTest.swift in Sources */, 242 | 1800E2F2203C86AF00CC3933 /* ReadWriteLockTest.swift in Sources */, 243 | 1800E2F9203C86AF00CC3933 /* UnfairLockTest.swift in Sources */, 244 | 1800E2F4203C86AF00CC3933 /* AtomicOperationsTest.swift in Sources */, 245 | 1800E2FB203C86AF00CC3933 /* QosTest.swift in Sources */, 246 | 1800E2F6203C86AF00CC3933 /* SpinLockTest.swift in Sources */, 247 | 1800E2FA203C86AF00CC3933 /* ThreadTest.swift in Sources */, 248 | ); 249 | runOnlyForDeploymentPostprocessing = 0; 250 | }; 251 | /* End PBXSourcesBuildPhase section */ 252 | 253 | /* Begin PBXTargetDependency section */ 254 | 1800E2DB203C849D00CC3933 /* PBXTargetDependency */ = { 255 | isa = PBXTargetDependency; 256 | target = 1800E2C4203C849C00CC3933 /* MultithreadingExamples */; 257 | targetProxy = 1800E2DA203C849D00CC3933 /* PBXContainerItemProxy */; 258 | }; 259 | /* End PBXTargetDependency section */ 260 | 261 | /* Begin PBXVariantGroup section */ 262 | 1800E2CC203C849C00CC3933 /* Main.storyboard */ = { 263 | isa = PBXVariantGroup; 264 | children = ( 265 | 1800E2CD203C849C00CC3933 /* Base */, 266 | ); 267 | name = Main.storyboard; 268 | sourceTree = ""; 269 | }; 270 | 1800E2D1203C849C00CC3933 /* LaunchScreen.storyboard */ = { 271 | isa = PBXVariantGroup; 272 | children = ( 273 | 1800E2D2203C849C00CC3933 /* Base */, 274 | ); 275 | name = LaunchScreen.storyboard; 276 | sourceTree = ""; 277 | }; 278 | /* End PBXVariantGroup section */ 279 | 280 | /* Begin XCBuildConfiguration section */ 281 | 1800E2E0203C849D00CC3933 /* Debug */ = { 282 | isa = XCBuildConfiguration; 283 | buildSettings = { 284 | ALWAYS_SEARCH_USER_PATHS = NO; 285 | CLANG_ANALYZER_NONNULL = YES; 286 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 287 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 288 | CLANG_CXX_LIBRARY = "libc++"; 289 | CLANG_ENABLE_MODULES = YES; 290 | CLANG_ENABLE_OBJC_ARC = YES; 291 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 292 | CLANG_WARN_BOOL_CONVERSION = YES; 293 | CLANG_WARN_COMMA = YES; 294 | CLANG_WARN_CONSTANT_CONVERSION = YES; 295 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 296 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 297 | CLANG_WARN_EMPTY_BODY = YES; 298 | CLANG_WARN_ENUM_CONVERSION = YES; 299 | CLANG_WARN_INFINITE_RECURSION = YES; 300 | CLANG_WARN_INT_CONVERSION = YES; 301 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 302 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 303 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 304 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 305 | CLANG_WARN_STRICT_PROTOTYPES = YES; 306 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 307 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 308 | CLANG_WARN_UNREACHABLE_CODE = YES; 309 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 310 | CODE_SIGN_IDENTITY = "iPhone Developer"; 311 | COPY_PHASE_STRIP = NO; 312 | DEBUG_INFORMATION_FORMAT = dwarf; 313 | ENABLE_STRICT_OBJC_MSGSEND = YES; 314 | ENABLE_TESTABILITY = YES; 315 | GCC_C_LANGUAGE_STANDARD = gnu11; 316 | GCC_DYNAMIC_NO_PIC = NO; 317 | GCC_NO_COMMON_BLOCKS = YES; 318 | GCC_OPTIMIZATION_LEVEL = 0; 319 | GCC_PREPROCESSOR_DEFINITIONS = ( 320 | "DEBUG=1", 321 | "$(inherited)", 322 | ); 323 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 324 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 325 | GCC_WARN_UNDECLARED_SELECTOR = YES; 326 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 327 | GCC_WARN_UNUSED_FUNCTION = YES; 328 | GCC_WARN_UNUSED_VARIABLE = YES; 329 | IPHONEOS_DEPLOYMENT_TARGET = 11.2; 330 | MTL_ENABLE_DEBUG_INFO = YES; 331 | ONLY_ACTIVE_ARCH = YES; 332 | SDKROOT = iphoneos; 333 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 334 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 335 | }; 336 | name = Debug; 337 | }; 338 | 1800E2E1203C849D00CC3933 /* Release */ = { 339 | isa = XCBuildConfiguration; 340 | buildSettings = { 341 | ALWAYS_SEARCH_USER_PATHS = NO; 342 | CLANG_ANALYZER_NONNULL = YES; 343 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 344 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 345 | CLANG_CXX_LIBRARY = "libc++"; 346 | CLANG_ENABLE_MODULES = YES; 347 | CLANG_ENABLE_OBJC_ARC = YES; 348 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 349 | CLANG_WARN_BOOL_CONVERSION = YES; 350 | CLANG_WARN_COMMA = YES; 351 | CLANG_WARN_CONSTANT_CONVERSION = YES; 352 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 353 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 354 | CLANG_WARN_EMPTY_BODY = YES; 355 | CLANG_WARN_ENUM_CONVERSION = YES; 356 | CLANG_WARN_INFINITE_RECURSION = YES; 357 | CLANG_WARN_INT_CONVERSION = YES; 358 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 359 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 360 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 361 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 362 | CLANG_WARN_STRICT_PROTOTYPES = YES; 363 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 364 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 365 | CLANG_WARN_UNREACHABLE_CODE = YES; 366 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 367 | CODE_SIGN_IDENTITY = "iPhone Developer"; 368 | COPY_PHASE_STRIP = NO; 369 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 370 | ENABLE_NS_ASSERTIONS = NO; 371 | ENABLE_STRICT_OBJC_MSGSEND = YES; 372 | GCC_C_LANGUAGE_STANDARD = gnu11; 373 | GCC_NO_COMMON_BLOCKS = YES; 374 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 375 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 376 | GCC_WARN_UNDECLARED_SELECTOR = YES; 377 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 378 | GCC_WARN_UNUSED_FUNCTION = YES; 379 | GCC_WARN_UNUSED_VARIABLE = YES; 380 | IPHONEOS_DEPLOYMENT_TARGET = 11.2; 381 | MTL_ENABLE_DEBUG_INFO = NO; 382 | SDKROOT = iphoneos; 383 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 384 | VALIDATE_PRODUCT = YES; 385 | }; 386 | name = Release; 387 | }; 388 | 1800E2E3203C849D00CC3933 /* Debug */ = { 389 | isa = XCBuildConfiguration; 390 | buildSettings = { 391 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 392 | CODE_SIGN_STYLE = Automatic; 393 | DEVELOPMENT_TEAM = PDTXSYFVEX; 394 | INFOPLIST_FILE = MultithreadingExamples/Info.plist; 395 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 396 | PRODUCT_BUNDLE_IDENTIFIER = as.MultithreadingExamples; 397 | PRODUCT_NAME = "$(TARGET_NAME)"; 398 | SWIFT_VERSION = 4.0; 399 | TARGETED_DEVICE_FAMILY = "1,2"; 400 | }; 401 | name = Debug; 402 | }; 403 | 1800E2E4203C849D00CC3933 /* Release */ = { 404 | isa = XCBuildConfiguration; 405 | buildSettings = { 406 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 407 | CODE_SIGN_STYLE = Automatic; 408 | DEVELOPMENT_TEAM = PDTXSYFVEX; 409 | INFOPLIST_FILE = MultithreadingExamples/Info.plist; 410 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 411 | PRODUCT_BUNDLE_IDENTIFIER = as.MultithreadingExamples; 412 | PRODUCT_NAME = "$(TARGET_NAME)"; 413 | SWIFT_VERSION = 4.0; 414 | TARGETED_DEVICE_FAMILY = "1,2"; 415 | }; 416 | name = Release; 417 | }; 418 | 1800E2E6203C849D00CC3933 /* Debug */ = { 419 | isa = XCBuildConfiguration; 420 | buildSettings = { 421 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 422 | BUNDLE_LOADER = "$(TEST_HOST)"; 423 | CODE_SIGN_STYLE = Automatic; 424 | DEVELOPMENT_TEAM = PDTXSYFVEX; 425 | INFOPLIST_FILE = MultithreadingExamplesTests/Info.plist; 426 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 427 | PRODUCT_BUNDLE_IDENTIFIER = as.MultithreadingExamplesTests; 428 | PRODUCT_NAME = "$(TARGET_NAME)"; 429 | SWIFT_VERSION = 4.0; 430 | TARGETED_DEVICE_FAMILY = "1,2"; 431 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MultithreadingExamples.app/MultithreadingExamples"; 432 | }; 433 | name = Debug; 434 | }; 435 | 1800E2E7203C849D00CC3933 /* Release */ = { 436 | isa = XCBuildConfiguration; 437 | buildSettings = { 438 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 439 | BUNDLE_LOADER = "$(TEST_HOST)"; 440 | CODE_SIGN_STYLE = Automatic; 441 | DEVELOPMENT_TEAM = PDTXSYFVEX; 442 | INFOPLIST_FILE = MultithreadingExamplesTests/Info.plist; 443 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 444 | PRODUCT_BUNDLE_IDENTIFIER = as.MultithreadingExamplesTests; 445 | PRODUCT_NAME = "$(TARGET_NAME)"; 446 | SWIFT_VERSION = 4.0; 447 | TARGETED_DEVICE_FAMILY = "1,2"; 448 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MultithreadingExamples.app/MultithreadingExamples"; 449 | }; 450 | name = Release; 451 | }; 452 | /* End XCBuildConfiguration section */ 453 | 454 | /* Begin XCConfigurationList section */ 455 | 1800E2C0203C849C00CC3933 /* Build configuration list for PBXProject "MultithreadingExamples" */ = { 456 | isa = XCConfigurationList; 457 | buildConfigurations = ( 458 | 1800E2E0203C849D00CC3933 /* Debug */, 459 | 1800E2E1203C849D00CC3933 /* Release */, 460 | ); 461 | defaultConfigurationIsVisible = 0; 462 | defaultConfigurationName = Release; 463 | }; 464 | 1800E2E2203C849D00CC3933 /* Build configuration list for PBXNativeTarget "MultithreadingExamples" */ = { 465 | isa = XCConfigurationList; 466 | buildConfigurations = ( 467 | 1800E2E3203C849D00CC3933 /* Debug */, 468 | 1800E2E4203C849D00CC3933 /* Release */, 469 | ); 470 | defaultConfigurationIsVisible = 0; 471 | defaultConfigurationName = Release; 472 | }; 473 | 1800E2E5203C849D00CC3933 /* Build configuration list for PBXNativeTarget "MultithreadingExamplesTests" */ = { 474 | isa = XCConfigurationList; 475 | buildConfigurations = ( 476 | 1800E2E6203C849D00CC3933 /* Debug */, 477 | 1800E2E7203C849D00CC3933 /* Release */, 478 | ); 479 | defaultConfigurationIsVisible = 0; 480 | defaultConfigurationName = Release; 481 | }; 482 | /* End XCConfigurationList section */ 483 | }; 484 | rootObject = 1800E2BD203C849C00CC3933 /* Project object */; 485 | } 486 | -------------------------------------------------------------------------------- /gcdExamples/gcdExamples.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 48; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 187434F6203B115000D8B795 /* AsyncVsSyncConcurrentTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 187434F5203B115000D8B795 /* AsyncVsSyncConcurrentTest.swift */; }; 11 | 187434F8203B12EB00D8B795 /* AsyncAfterTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 187434F7203B12EB00D8B795 /* AsyncAfterTest.swift */; }; 12 | 187434FA203B133600D8B795 /* ConcurrentPerformTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 187434F9203B133600D8B795 /* ConcurrentPerformTest.swift */; }; 13 | 187434FC203B13AC00D8B795 /* DispatchWorkItemNotifyTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 187434FB203B13AC00D8B795 /* DispatchWorkItemNotifyTest.swift */; }; 14 | 187434FE203B1B0400D8B795 /* DispatchWorkItemCancelTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 187434FD203B1B0400D8B795 /* DispatchWorkItemCancelTest.swift */; }; 15 | 18743500203B1DCE00D8B795 /* DispatchSemaphoreTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 187434FF203B1DCE00D8B795 /* DispatchSemaphoreTest.swift */; }; 16 | 18743502203B202200D8B795 /* DispatchGroupTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18743501203B202200D8B795 /* DispatchGroupTest.swift */; }; 17 | 18743504203B211F00D8B795 /* DispatchSourceTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18743503203B211F00D8B795 /* DispatchSourceTest.swift */; }; 18 | 18743506203B339E00D8B795 /* DispatchBarrierTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18743505203B339E00D8B795 /* DispatchBarrierTest.swift */; }; 19 | 18743508203B36B300D8B795 /* TargetQueueHierarchyTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18743507203B36B300D8B795 /* TargetQueueHierarchyTest.swift */; }; 20 | 18F29A37203B0F0800A22AD0 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18F29A36203B0F0800A22AD0 /* AppDelegate.swift */; }; 21 | 18F29A39203B0F0800A22AD0 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18F29A38203B0F0800A22AD0 /* ViewController.swift */; }; 22 | 18F29A3C203B0F0800A22AD0 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 18F29A3A203B0F0800A22AD0 /* Main.storyboard */; }; 23 | 18F29A3E203B0F0800A22AD0 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 18F29A3D203B0F0800A22AD0 /* Assets.xcassets */; }; 24 | 18F29A41203B0F0800A22AD0 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 18F29A3F203B0F0800A22AD0 /* LaunchScreen.storyboard */; }; 25 | 18F29A57203B0F6800A22AD0 /* AsyncVsSyncSerialTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18F29A56203B0F6800A22AD0 /* AsyncVsSyncSerialTest.swift */; }; 26 | /* End PBXBuildFile section */ 27 | 28 | /* Begin PBXContainerItemProxy section */ 29 | 18F29A48203B0F0800A22AD0 /* PBXContainerItemProxy */ = { 30 | isa = PBXContainerItemProxy; 31 | containerPortal = 18F29A2B203B0F0800A22AD0 /* Project object */; 32 | proxyType = 1; 33 | remoteGlobalIDString = 18F29A32203B0F0800A22AD0; 34 | remoteInfo = gcdExamples; 35 | }; 36 | /* End PBXContainerItemProxy section */ 37 | 38 | /* Begin PBXFileReference section */ 39 | 187434F5203B115000D8B795 /* AsyncVsSyncConcurrentTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AsyncVsSyncConcurrentTest.swift; sourceTree = ""; }; 40 | 187434F7203B12EB00D8B795 /* AsyncAfterTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AsyncAfterTest.swift; sourceTree = ""; }; 41 | 187434F9203B133600D8B795 /* ConcurrentPerformTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConcurrentPerformTest.swift; sourceTree = ""; }; 42 | 187434FB203B13AC00D8B795 /* DispatchWorkItemNotifyTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DispatchWorkItemNotifyTest.swift; sourceTree = ""; }; 43 | 187434FD203B1B0400D8B795 /* DispatchWorkItemCancelTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DispatchWorkItemCancelTest.swift; sourceTree = ""; }; 44 | 187434FF203B1DCE00D8B795 /* DispatchSemaphoreTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DispatchSemaphoreTest.swift; sourceTree = ""; }; 45 | 18743501203B202200D8B795 /* DispatchGroupTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DispatchGroupTest.swift; sourceTree = ""; }; 46 | 18743503203B211F00D8B795 /* DispatchSourceTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DispatchSourceTest.swift; sourceTree = ""; }; 47 | 18743505203B339E00D8B795 /* DispatchBarrierTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DispatchBarrierTest.swift; sourceTree = ""; }; 48 | 18743507203B36B300D8B795 /* TargetQueueHierarchyTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TargetQueueHierarchyTest.swift; sourceTree = ""; }; 49 | 18F29A33203B0F0800A22AD0 /* gcdExamples.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = gcdExamples.app; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | 18F29A36203B0F0800A22AD0 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 51 | 18F29A38203B0F0800A22AD0 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 52 | 18F29A3B203B0F0800A22AD0 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 53 | 18F29A3D203B0F0800A22AD0 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 54 | 18F29A40203B0F0800A22AD0 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 55 | 18F29A42203B0F0800A22AD0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 56 | 18F29A47203B0F0800A22AD0 /* gcdExamplesTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = gcdExamplesTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 57 | 18F29A4D203B0F0800A22AD0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 58 | 18F29A56203B0F6800A22AD0 /* AsyncVsSyncSerialTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AsyncVsSyncSerialTest.swift; sourceTree = ""; }; 59 | /* End PBXFileReference section */ 60 | 61 | /* Begin PBXFrameworksBuildPhase section */ 62 | 18F29A30203B0F0800A22AD0 /* Frameworks */ = { 63 | isa = PBXFrameworksBuildPhase; 64 | buildActionMask = 2147483647; 65 | files = ( 66 | ); 67 | runOnlyForDeploymentPostprocessing = 0; 68 | }; 69 | 18F29A44203B0F0800A22AD0 /* Frameworks */ = { 70 | isa = PBXFrameworksBuildPhase; 71 | buildActionMask = 2147483647; 72 | files = ( 73 | ); 74 | runOnlyForDeploymentPostprocessing = 0; 75 | }; 76 | /* End PBXFrameworksBuildPhase section */ 77 | 78 | /* Begin PBXGroup section */ 79 | 18F29A2A203B0F0800A22AD0 = { 80 | isa = PBXGroup; 81 | children = ( 82 | 18F29A35203B0F0800A22AD0 /* gcdExamples */, 83 | 18F29A4A203B0F0800A22AD0 /* gcdExamplesTests */, 84 | 18F29A34203B0F0800A22AD0 /* Products */, 85 | ); 86 | sourceTree = ""; 87 | }; 88 | 18F29A34203B0F0800A22AD0 /* Products */ = { 89 | isa = PBXGroup; 90 | children = ( 91 | 18F29A33203B0F0800A22AD0 /* gcdExamples.app */, 92 | 18F29A47203B0F0800A22AD0 /* gcdExamplesTests.xctest */, 93 | ); 94 | name = Products; 95 | sourceTree = ""; 96 | }; 97 | 18F29A35203B0F0800A22AD0 /* gcdExamples */ = { 98 | isa = PBXGroup; 99 | children = ( 100 | 18F29A36203B0F0800A22AD0 /* AppDelegate.swift */, 101 | 18F29A38203B0F0800A22AD0 /* ViewController.swift */, 102 | 18F29A3A203B0F0800A22AD0 /* Main.storyboard */, 103 | 18F29A3D203B0F0800A22AD0 /* Assets.xcassets */, 104 | 18F29A3F203B0F0800A22AD0 /* LaunchScreen.storyboard */, 105 | 18F29A42203B0F0800A22AD0 /* Info.plist */, 106 | ); 107 | path = gcdExamples; 108 | sourceTree = ""; 109 | }; 110 | 18F29A4A203B0F0800A22AD0 /* gcdExamplesTests */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | 18F29A4D203B0F0800A22AD0 /* Info.plist */, 114 | 18F29A56203B0F6800A22AD0 /* AsyncVsSyncSerialTest.swift */, 115 | 187434F5203B115000D8B795 /* AsyncVsSyncConcurrentTest.swift */, 116 | 187434F7203B12EB00D8B795 /* AsyncAfterTest.swift */, 117 | 187434F9203B133600D8B795 /* ConcurrentPerformTest.swift */, 118 | 187434FB203B13AC00D8B795 /* DispatchWorkItemNotifyTest.swift */, 119 | 187434FD203B1B0400D8B795 /* DispatchWorkItemCancelTest.swift */, 120 | 187434FF203B1DCE00D8B795 /* DispatchSemaphoreTest.swift */, 121 | 18743501203B202200D8B795 /* DispatchGroupTest.swift */, 122 | 18743503203B211F00D8B795 /* DispatchSourceTest.swift */, 123 | 18743505203B339E00D8B795 /* DispatchBarrierTest.swift */, 124 | 18743507203B36B300D8B795 /* TargetQueueHierarchyTest.swift */, 125 | ); 126 | path = gcdExamplesTests; 127 | sourceTree = ""; 128 | }; 129 | /* End PBXGroup section */ 130 | 131 | /* Begin PBXNativeTarget section */ 132 | 18F29A32203B0F0800A22AD0 /* gcdExamples */ = { 133 | isa = PBXNativeTarget; 134 | buildConfigurationList = 18F29A50203B0F0800A22AD0 /* Build configuration list for PBXNativeTarget "gcdExamples" */; 135 | buildPhases = ( 136 | 18F29A2F203B0F0800A22AD0 /* Sources */, 137 | 18F29A30203B0F0800A22AD0 /* Frameworks */, 138 | 18F29A31203B0F0800A22AD0 /* Resources */, 139 | ); 140 | buildRules = ( 141 | ); 142 | dependencies = ( 143 | ); 144 | name = gcdExamples; 145 | productName = gcdExamples; 146 | productReference = 18F29A33203B0F0800A22AD0 /* gcdExamples.app */; 147 | productType = "com.apple.product-type.application"; 148 | }; 149 | 18F29A46203B0F0800A22AD0 /* gcdExamplesTests */ = { 150 | isa = PBXNativeTarget; 151 | buildConfigurationList = 18F29A53203B0F0800A22AD0 /* Build configuration list for PBXNativeTarget "gcdExamplesTests" */; 152 | buildPhases = ( 153 | 18F29A43203B0F0800A22AD0 /* Sources */, 154 | 18F29A44203B0F0800A22AD0 /* Frameworks */, 155 | 18F29A45203B0F0800A22AD0 /* Resources */, 156 | ); 157 | buildRules = ( 158 | ); 159 | dependencies = ( 160 | 18F29A49203B0F0800A22AD0 /* PBXTargetDependency */, 161 | ); 162 | name = gcdExamplesTests; 163 | productName = gcdExamplesTests; 164 | productReference = 18F29A47203B0F0800A22AD0 /* gcdExamplesTests.xctest */; 165 | productType = "com.apple.product-type.bundle.unit-test"; 166 | }; 167 | /* End PBXNativeTarget section */ 168 | 169 | /* Begin PBXProject section */ 170 | 18F29A2B203B0F0800A22AD0 /* Project object */ = { 171 | isa = PBXProject; 172 | attributes = { 173 | LastSwiftUpdateCheck = 0920; 174 | LastUpgradeCheck = 0920; 175 | ORGANIZATIONNAME = "Alexey Shchukin"; 176 | TargetAttributes = { 177 | 18F29A32203B0F0800A22AD0 = { 178 | CreatedOnToolsVersion = 9.2; 179 | ProvisioningStyle = Automatic; 180 | }; 181 | 18F29A46203B0F0800A22AD0 = { 182 | CreatedOnToolsVersion = 9.2; 183 | ProvisioningStyle = Automatic; 184 | TestTargetID = 18F29A32203B0F0800A22AD0; 185 | }; 186 | }; 187 | }; 188 | buildConfigurationList = 18F29A2E203B0F0800A22AD0 /* Build configuration list for PBXProject "gcdExamples" */; 189 | compatibilityVersion = "Xcode 8.0"; 190 | developmentRegion = en; 191 | hasScannedForEncodings = 0; 192 | knownRegions = ( 193 | en, 194 | Base, 195 | ); 196 | mainGroup = 18F29A2A203B0F0800A22AD0; 197 | productRefGroup = 18F29A34203B0F0800A22AD0 /* Products */; 198 | projectDirPath = ""; 199 | projectRoot = ""; 200 | targets = ( 201 | 18F29A32203B0F0800A22AD0 /* gcdExamples */, 202 | 18F29A46203B0F0800A22AD0 /* gcdExamplesTests */, 203 | ); 204 | }; 205 | /* End PBXProject section */ 206 | 207 | /* Begin PBXResourcesBuildPhase section */ 208 | 18F29A31203B0F0800A22AD0 /* Resources */ = { 209 | isa = PBXResourcesBuildPhase; 210 | buildActionMask = 2147483647; 211 | files = ( 212 | 18F29A41203B0F0800A22AD0 /* LaunchScreen.storyboard in Resources */, 213 | 18F29A3E203B0F0800A22AD0 /* Assets.xcassets in Resources */, 214 | 18F29A3C203B0F0800A22AD0 /* Main.storyboard in Resources */, 215 | ); 216 | runOnlyForDeploymentPostprocessing = 0; 217 | }; 218 | 18F29A45203B0F0800A22AD0 /* Resources */ = { 219 | isa = PBXResourcesBuildPhase; 220 | buildActionMask = 2147483647; 221 | files = ( 222 | ); 223 | runOnlyForDeploymentPostprocessing = 0; 224 | }; 225 | /* End PBXResourcesBuildPhase section */ 226 | 227 | /* Begin PBXSourcesBuildPhase section */ 228 | 18F29A2F203B0F0800A22AD0 /* Sources */ = { 229 | isa = PBXSourcesBuildPhase; 230 | buildActionMask = 2147483647; 231 | files = ( 232 | 18F29A39203B0F0800A22AD0 /* ViewController.swift in Sources */, 233 | 18F29A37203B0F0800A22AD0 /* AppDelegate.swift in Sources */, 234 | ); 235 | runOnlyForDeploymentPostprocessing = 0; 236 | }; 237 | 18F29A43203B0F0800A22AD0 /* Sources */ = { 238 | isa = PBXSourcesBuildPhase; 239 | buildActionMask = 2147483647; 240 | files = ( 241 | 187434FC203B13AC00D8B795 /* DispatchWorkItemNotifyTest.swift in Sources */, 242 | 18743506203B339E00D8B795 /* DispatchBarrierTest.swift in Sources */, 243 | 187434FA203B133600D8B795 /* ConcurrentPerformTest.swift in Sources */, 244 | 18F29A57203B0F6800A22AD0 /* AsyncVsSyncSerialTest.swift in Sources */, 245 | 18743504203B211F00D8B795 /* DispatchSourceTest.swift in Sources */, 246 | 18743502203B202200D8B795 /* DispatchGroupTest.swift in Sources */, 247 | 18743500203B1DCE00D8B795 /* DispatchSemaphoreTest.swift in Sources */, 248 | 187434F6203B115000D8B795 /* AsyncVsSyncConcurrentTest.swift in Sources */, 249 | 187434F8203B12EB00D8B795 /* AsyncAfterTest.swift in Sources */, 250 | 187434FE203B1B0400D8B795 /* DispatchWorkItemCancelTest.swift in Sources */, 251 | 18743508203B36B300D8B795 /* TargetQueueHierarchyTest.swift in Sources */, 252 | ); 253 | runOnlyForDeploymentPostprocessing = 0; 254 | }; 255 | /* End PBXSourcesBuildPhase section */ 256 | 257 | /* Begin PBXTargetDependency section */ 258 | 18F29A49203B0F0800A22AD0 /* PBXTargetDependency */ = { 259 | isa = PBXTargetDependency; 260 | target = 18F29A32203B0F0800A22AD0 /* gcdExamples */; 261 | targetProxy = 18F29A48203B0F0800A22AD0 /* PBXContainerItemProxy */; 262 | }; 263 | /* End PBXTargetDependency section */ 264 | 265 | /* Begin PBXVariantGroup section */ 266 | 18F29A3A203B0F0800A22AD0 /* Main.storyboard */ = { 267 | isa = PBXVariantGroup; 268 | children = ( 269 | 18F29A3B203B0F0800A22AD0 /* Base */, 270 | ); 271 | name = Main.storyboard; 272 | sourceTree = ""; 273 | }; 274 | 18F29A3F203B0F0800A22AD0 /* LaunchScreen.storyboard */ = { 275 | isa = PBXVariantGroup; 276 | children = ( 277 | 18F29A40203B0F0800A22AD0 /* Base */, 278 | ); 279 | name = LaunchScreen.storyboard; 280 | sourceTree = ""; 281 | }; 282 | /* End PBXVariantGroup section */ 283 | 284 | /* Begin XCBuildConfiguration section */ 285 | 18F29A4E203B0F0800A22AD0 /* Debug */ = { 286 | isa = XCBuildConfiguration; 287 | buildSettings = { 288 | ALWAYS_SEARCH_USER_PATHS = NO; 289 | CLANG_ANALYZER_NONNULL = YES; 290 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 291 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 292 | CLANG_CXX_LIBRARY = "libc++"; 293 | CLANG_ENABLE_MODULES = YES; 294 | CLANG_ENABLE_OBJC_ARC = YES; 295 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 296 | CLANG_WARN_BOOL_CONVERSION = YES; 297 | CLANG_WARN_COMMA = YES; 298 | CLANG_WARN_CONSTANT_CONVERSION = YES; 299 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 300 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 301 | CLANG_WARN_EMPTY_BODY = YES; 302 | CLANG_WARN_ENUM_CONVERSION = YES; 303 | CLANG_WARN_INFINITE_RECURSION = YES; 304 | CLANG_WARN_INT_CONVERSION = YES; 305 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 306 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 307 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 308 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 309 | CLANG_WARN_STRICT_PROTOTYPES = YES; 310 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 311 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 312 | CLANG_WARN_UNREACHABLE_CODE = YES; 313 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 314 | CODE_SIGN_IDENTITY = "iPhone Developer"; 315 | COPY_PHASE_STRIP = NO; 316 | DEBUG_INFORMATION_FORMAT = dwarf; 317 | ENABLE_STRICT_OBJC_MSGSEND = YES; 318 | ENABLE_TESTABILITY = YES; 319 | GCC_C_LANGUAGE_STANDARD = gnu11; 320 | GCC_DYNAMIC_NO_PIC = NO; 321 | GCC_NO_COMMON_BLOCKS = YES; 322 | GCC_OPTIMIZATION_LEVEL = 0; 323 | GCC_PREPROCESSOR_DEFINITIONS = ( 324 | "DEBUG=1", 325 | "$(inherited)", 326 | ); 327 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 328 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 329 | GCC_WARN_UNDECLARED_SELECTOR = YES; 330 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 331 | GCC_WARN_UNUSED_FUNCTION = YES; 332 | GCC_WARN_UNUSED_VARIABLE = YES; 333 | IPHONEOS_DEPLOYMENT_TARGET = 11.2; 334 | MTL_ENABLE_DEBUG_INFO = YES; 335 | ONLY_ACTIVE_ARCH = YES; 336 | SDKROOT = iphoneos; 337 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 338 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 339 | }; 340 | name = Debug; 341 | }; 342 | 18F29A4F203B0F0800A22AD0 /* Release */ = { 343 | isa = XCBuildConfiguration; 344 | buildSettings = { 345 | ALWAYS_SEARCH_USER_PATHS = NO; 346 | CLANG_ANALYZER_NONNULL = YES; 347 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 348 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 349 | CLANG_CXX_LIBRARY = "libc++"; 350 | CLANG_ENABLE_MODULES = YES; 351 | CLANG_ENABLE_OBJC_ARC = YES; 352 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 353 | CLANG_WARN_BOOL_CONVERSION = YES; 354 | CLANG_WARN_COMMA = YES; 355 | CLANG_WARN_CONSTANT_CONVERSION = YES; 356 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 357 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 358 | CLANG_WARN_EMPTY_BODY = YES; 359 | CLANG_WARN_ENUM_CONVERSION = YES; 360 | CLANG_WARN_INFINITE_RECURSION = YES; 361 | CLANG_WARN_INT_CONVERSION = YES; 362 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 363 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 364 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 365 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 366 | CLANG_WARN_STRICT_PROTOTYPES = YES; 367 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 368 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 369 | CLANG_WARN_UNREACHABLE_CODE = YES; 370 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 371 | CODE_SIGN_IDENTITY = "iPhone Developer"; 372 | COPY_PHASE_STRIP = NO; 373 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 374 | ENABLE_NS_ASSERTIONS = NO; 375 | ENABLE_STRICT_OBJC_MSGSEND = YES; 376 | GCC_C_LANGUAGE_STANDARD = gnu11; 377 | GCC_NO_COMMON_BLOCKS = YES; 378 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 379 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 380 | GCC_WARN_UNDECLARED_SELECTOR = YES; 381 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 382 | GCC_WARN_UNUSED_FUNCTION = YES; 383 | GCC_WARN_UNUSED_VARIABLE = YES; 384 | IPHONEOS_DEPLOYMENT_TARGET = 11.2; 385 | MTL_ENABLE_DEBUG_INFO = NO; 386 | SDKROOT = iphoneos; 387 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 388 | VALIDATE_PRODUCT = YES; 389 | }; 390 | name = Release; 391 | }; 392 | 18F29A51203B0F0800A22AD0 /* Debug */ = { 393 | isa = XCBuildConfiguration; 394 | buildSettings = { 395 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 396 | CODE_SIGN_STYLE = Automatic; 397 | DEVELOPMENT_TEAM = PDTXSYFVEX; 398 | INFOPLIST_FILE = gcdExamples/Info.plist; 399 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 400 | PRODUCT_BUNDLE_IDENTIFIER = as.gcdExamples; 401 | PRODUCT_NAME = "$(TARGET_NAME)"; 402 | SWIFT_VERSION = 4.0; 403 | TARGETED_DEVICE_FAMILY = "1,2"; 404 | }; 405 | name = Debug; 406 | }; 407 | 18F29A52203B0F0800A22AD0 /* Release */ = { 408 | isa = XCBuildConfiguration; 409 | buildSettings = { 410 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 411 | CODE_SIGN_STYLE = Automatic; 412 | DEVELOPMENT_TEAM = PDTXSYFVEX; 413 | INFOPLIST_FILE = gcdExamples/Info.plist; 414 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 415 | PRODUCT_BUNDLE_IDENTIFIER = as.gcdExamples; 416 | PRODUCT_NAME = "$(TARGET_NAME)"; 417 | SWIFT_VERSION = 4.0; 418 | TARGETED_DEVICE_FAMILY = "1,2"; 419 | }; 420 | name = Release; 421 | }; 422 | 18F29A54203B0F0800A22AD0 /* Debug */ = { 423 | isa = XCBuildConfiguration; 424 | buildSettings = { 425 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 426 | BUNDLE_LOADER = "$(TEST_HOST)"; 427 | CODE_SIGN_STYLE = Automatic; 428 | DEVELOPMENT_TEAM = PDTXSYFVEX; 429 | INFOPLIST_FILE = gcdExamplesTests/Info.plist; 430 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 431 | PRODUCT_BUNDLE_IDENTIFIER = as.gcdExamplesTests; 432 | PRODUCT_NAME = "$(TARGET_NAME)"; 433 | SWIFT_VERSION = 4.0; 434 | TARGETED_DEVICE_FAMILY = "1,2"; 435 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/gcdExamples.app/gcdExamples"; 436 | }; 437 | name = Debug; 438 | }; 439 | 18F29A55203B0F0800A22AD0 /* Release */ = { 440 | isa = XCBuildConfiguration; 441 | buildSettings = { 442 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 443 | BUNDLE_LOADER = "$(TEST_HOST)"; 444 | CODE_SIGN_STYLE = Automatic; 445 | DEVELOPMENT_TEAM = PDTXSYFVEX; 446 | INFOPLIST_FILE = gcdExamplesTests/Info.plist; 447 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 448 | PRODUCT_BUNDLE_IDENTIFIER = as.gcdExamplesTests; 449 | PRODUCT_NAME = "$(TARGET_NAME)"; 450 | SWIFT_VERSION = 4.0; 451 | TARGETED_DEVICE_FAMILY = "1,2"; 452 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/gcdExamples.app/gcdExamples"; 453 | }; 454 | name = Release; 455 | }; 456 | /* End XCBuildConfiguration section */ 457 | 458 | /* Begin XCConfigurationList section */ 459 | 18F29A2E203B0F0800A22AD0 /* Build configuration list for PBXProject "gcdExamples" */ = { 460 | isa = XCConfigurationList; 461 | buildConfigurations = ( 462 | 18F29A4E203B0F0800A22AD0 /* Debug */, 463 | 18F29A4F203B0F0800A22AD0 /* Release */, 464 | ); 465 | defaultConfigurationIsVisible = 0; 466 | defaultConfigurationName = Release; 467 | }; 468 | 18F29A50203B0F0800A22AD0 /* Build configuration list for PBXNativeTarget "gcdExamples" */ = { 469 | isa = XCConfigurationList; 470 | buildConfigurations = ( 471 | 18F29A51203B0F0800A22AD0 /* Debug */, 472 | 18F29A52203B0F0800A22AD0 /* Release */, 473 | ); 474 | defaultConfigurationIsVisible = 0; 475 | defaultConfigurationName = Release; 476 | }; 477 | 18F29A53203B0F0800A22AD0 /* Build configuration list for PBXNativeTarget "gcdExamplesTests" */ = { 478 | isa = XCConfigurationList; 479 | buildConfigurations = ( 480 | 18F29A54203B0F0800A22AD0 /* Debug */, 481 | 18F29A55203B0F0800A22AD0 /* Release */, 482 | ); 483 | defaultConfigurationIsVisible = 0; 484 | defaultConfigurationName = Release; 485 | }; 486 | /* End XCConfigurationList section */ 487 | }; 488 | rootObject = 18F29A2B203B0F0800A22AD0 /* Project object */; 489 | } 490 | --------------------------------------------------------------------------------