Skip to content

Instantly share code, notes, and snippets.

View ZZhaiDev's full-sized avatar

ZZCoder ZZhaiDev

  • University of North Texas
  • Chicago, IL
View GitHub Profile

iOS Topic Questions

(from https://courses.codepath.com/courses/intro_to_ios/pages/ios_topic_questions)

Below you'll find questions that you should be able to answer after taking the iOS class. Some questions are commonly used in iOS interviews.

Views

@brennanMKE
brennanMKE / Async.swift
Last active March 6, 2023 13:01
Blocking with Semaphores and DispatchGroups in Swift
import PlaygroundSupport
import Foundation
class Worker {
private let queue = DispatchQueue.global(qos: .background)
private let serialQueue = DispatchQueue(label: "com.acme.serial")
public private(set) var count = 0
func incrementCount() {
import Foundation
import PlaygroundSupport
/// A thread-safe array.
public class SynchronizedArray<Element> {
private let queue = DispatchQueue(label: "io.zamzam.ZamzamKit.SynchronizedArray", attributes: .concurrent)
private var array = [Element]()
public init() { }