Multithreading & Async in iOS | A Basic Introduction

Поделиться
HTML-код
  • Опубликовано: 24 окт 2020
  • Learn how to use dispatch queues to perform tasks on a background queue in iOS with Swift.
    🔗Code:
    github.com/Sam-Meech-Ward/iOS...
    🔗Entire iOS Playlist
    • iOS with UIKit
    🔗Moar Links
    My Website: www.sammeechward.com
    Instagram: / meech_ward
    Github: github.com/orgs/Sam-Meech-Ward
    Ray Wenderlich Grand Central Dispatch Tutorial for Swift 4: www.raywenderlich.com/5370-gr...
    Intro to networking in iOS: • Networking in iOS with...
  • РазвлеченияРазвлечения

Комментарии • 9

  • @johncarson3333
    @johncarson3333 3 года назад +2

    Dude I was lost in the sauce with dispatch queue and that was a super legit explanation thank you

  • @OlegK-h6x
    @OlegK-h6x 2 года назад

    Понятное объяснение. Спасибо!

  • @kevinbahojb
    @kevinbahojb 2 года назад

    Thank you for your detailed and clear explanation, it was very helpful and understandable.

  • @dashadavid
    @dashadavid 3 года назад

    Hello Sam, great video! I understand more on DispatchQueue now thanks! I do have a question for you about this subject. I was wondering if I may ask you for some help please? thanks again for making this video and hope to hear from you soon

  • @cios3917
    @cios3917 3 года назад

    What is the difference between sync vs async?

    • @SamMeechWard
      @SamMeechWard  3 года назад

      One is synchronous and the other is asynchronous 🤣

    • @SamMeechWard
      @SamMeechWard  3 года назад +4

      print("a")
      backgroundQueue.async {
      print("b")
      }
      print("c")
      The short answer is: the order that these will be printed out is a, c, b. If you change async to sync, the order will be a, b, c. Even though print("b") happens on a different queue, the main queue will still wait for it to complete if we use a sync block. sync is not usually desirable.

  • @tenminutetokyo2643
    @tenminutetokyo2643 2 года назад

    That's a weird place for a fireplace.