Async/Await in Swift | Comparison vs Closures and Combine Framework

Поділитися
Вставка
  • Опубліковано 17 січ 2025

КОМЕНТАРІ • 32

  • @markph0204
    @markph0204 3 роки тому

    ...However, in some cases the system could sent it to another thread.

    • @swiftandtips
      @swiftandtips  3 роки тому +1

      Hi Mark, you are right, actors protect your data against data races by multiple threads. What I meant is that with actos you can have a better control over what is getting access to your resource, but your point is absolutely valid. Sorry if that wasn’t clear enough.

    • @swiftandtips
      @swiftandtips  3 роки тому +1

      By the way, I also talked about Actors in this video ua-cam.com/video/8jvtHCXJ4Ow/v-deo.html 😃

    • @markph0204
      @markph0204 3 роки тому

      @@swiftandtips All good - I could have written my reply better too. ... but to ensure only one thread accesses the actor at one time. :-)

  • @ColeDano
    @ColeDano 3 роки тому

    Thanks for going over the old way and the new async await way. Super helpful for me.

  • @気にしない-o8q
    @気にしない-o8q Рік тому

    brilliante, magnifico! excellent explanation of the topic !!!! you are a genius

  • @gacastro
    @gacastro 3 роки тому

    Another excellent video that puts a new concept in context of current options which I find very helpful. 👍

  • @rungxanh2901
    @rungxanh2901 3 роки тому

    Thank you so much for the great demo Pitt 🤟🏻

  • @rodspears
    @rodspears 3 роки тому +1

    Great video! I really liked the use of three difference approaches to the problem. async/wait looks much clean than Combine.

    • @swiftandtips
      @swiftandtips  3 роки тому

      Thank you @Rod! And I agree with you, async/await is much cleaner 👌

  • @Leopugpiano
    @Leopugpiano 3 роки тому +1

    hey man, great content keep going!

  • @indomitabletr1834
    @indomitabletr1834 Рік тому +1

    Should we cancel async await functions if we push another screen etc?

    • @swiftandtips
      @swiftandtips  Рік тому +1

      Great question, if it’s inside a task modifier then the operation will be cancelled.

  • @roman3249
    @roman3249 2 роки тому

    Awesome 🔥

  • @VitorFerrazVarela
    @VitorFerrazVarela Рік тому

    This is a fantastic video, but I have one question. What would occur if I made an asynchronous request that took a while to receive a response, and in the meantime, I navigated back to the previous screen and wanted to cancel the unfinished request? How could I manage that situation?

    • @swiftandtips
      @swiftandtips  Рік тому

      Great question Vitor, I would suggest to take a look to this post: www.hackingwithswift.com/quick-start/concurrency/how-to-cancel-a-task

  • @abdulwahabkhan4316
    @abdulwahabkhan4316 Рік тому

    Did you ever use "debounce" or "semaphore" in your network calls. ??

  • @robmontesinos
    @robmontesinos 3 роки тому

    Excellent video. What would be your guess as to when this feature will be available for production?

    • @swiftandtips
      @swiftandtips  3 роки тому +1

      Hi @Roberto, once “iPhone 13” is announced, iOS 15 will be released along with Xcode 13 and there is when officially we can start using it for production. Normally this happens at most early Octubre.
      Thank you for your support! 😋

  • @venusajja7038
    @venusajja7038 3 місяці тому

    In my code i am displaying the message on tableView in ios swift uikit using actor, the table view delegate methods will call synchronously but the data from actor isolated property i am getting using Task method with in that tableview delegates synchronous execution, now the problem is the tableview delegates method synchronous execution is not waiting for the Task method to wait, can any one suggest on this please

  • @jemmytech5474
    @jemmytech5474 Рік тому

    great tutorial. Keep it up.
    can you help me to create a sandBox tester account ? I am getting an error of "This email address is not available for use as an Apple ID. You may already have an Apple ID associated with this address. Please try again or sign in using your existing Apple ID."

    • @swiftandtips
      @swiftandtips  Рік тому +1

      Hi Jemmy, I would need more context to guide you on this. What have you found on google?

  • @vaibhavshiledar
    @vaibhavshiledar 3 роки тому

    Hello sir, please make next tutorial on Method swizzling in swift

    • @swiftandtips
      @swiftandtips  3 роки тому

      Hi @Vaibhav, I will investigate about it. Thank you for the idea! 😁

  • @jackdanyal4329
    @jackdanyal4329 3 роки тому

    Swift 15.5 and let us introduce Channels 😂