Giter Site home page Giter Site logo

aronskaya / fun-with-gcd Goto Github PK

View Code? Open in Web Editor NEW
13.0 2.0 8.0 24 KB

This project is a showcase for most concepts and tasks, that we can perfrom using Grand Central Dispatch. I have prepared being an iOS Expert for iOS Ukraine conference #1

License: MIT License

Swift 100.00%

fun-with-gcd's Introduction

Fun with Grand Central Dispatch

This project is a showcase for most concepts and tasks, that we can perfrom using Grand Central Dispatch. I have prepared it being for my iOS Expert role at iOS Ukraine conference #1, that took place in September 2020.

It consists of a series of tasks, from basic to more complex, that illustrate how something works or how a certain problem is usually solved.

How to use it

Open ViewController.swift and uncomment a task you are interested in. Run!

0️⃣ Task 0

Illustrates how synchronous execution works

1️⃣ Task 1

Illustrates how asynchronous execution works

2️⃣ Task 2

Illustrates how concurrent and serial queues work

3️⃣ Task 3

Illustrates how the system handles queues with different quality of service

4️⃣ Task 4

Illustrates how the system handles queues with different quality of service comparing to main queue

5️⃣ Task 5

Illustrates how the system handles queues with different quality of service

6️⃣ Task 6

Illustrates concurrent access to a property and a way to protect a property

7️⃣ Task 7

Illustrates how concurrent execution of a not protected section of code can crash an app in a place where everything looks fine

8️⃣ Task 8

Illustrates how to synchronize an asynchronous API

9️⃣ Task 9

Shows how to create own very simple asynchronous interface

🔟 Task 10

Shows how to create an asynchronous interface in a way, that is used extnsively in Apple products

1️⃣1️⃣ Task 11

Know how to deadlock (so you won't do it)

1️⃣2️⃣ Task 12

Illustrates how to execute a completion after several asynchronous tasks are finished (like updating UI after getting responses on several API requests)

Further Reading

There is an excellent book on GCD: 'Pro Multythreading and Memory Management for iOS and OSX with ARC, Grand Central Dispatch and Blocks' by Kazuki Sakamoto and Tomohiko Furumoto.

fun-with-gcd's People

Contributors

aronskaya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.