У нас вы можете посмотреть бесплатно Implementing Task Timeout in Swift Concurrency или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
Learn how you can implement a task racing mechanism as well as a mechanism to timeout tasks in Swift Concurrency. You'll learn a bit about task cancellation, structured concurrency, task groups, and more in order to implement two convenient functions to have a timeout and the ability to race two tasks. Note that the code in this video is by no means perfect nor does it cover all edge cases. It's meant to illustrate the thought and design process behind a feature like the one I'm implementing here, and why it's pretty hard to properly implement task cancellation and task timeouts. If you're looking for a more complete task timeout implementation, I highly recommend that you take a look at this package: https://github.com/swhitty/swift-timeout Learn more about @escaping: • @escaping in Swift explained Learn more about sending: • Sending vs. @Sendable in Swift 6 Improve your concurrency skills with my book, workshops, and course: https://practicalswiftconcurrency.com/ https://donnyplus.com/p/practical-swi... https://www.donnywals.com/workshops/ This video is a companion for my blog post on the same topic: https://www.donnywals.com/implementin... Timestamps: 00:00 - Intro 02:10 - Task racing 09:35 - Task timeout 15:45 - Cooperative cancellation 20:13 - Summary