Загрузка страницы

Cancel task in Grand Central Dispatch GCD with DispatchWorkItem in Swift Hindi tutorial

DispatchWorkItem class in swift can be used when you want to cancel a task queued in grand central dispatch GCD. Mostly a question which is asked in interviews is if you can cancel a task in GCD and we say no and prefer to use Operation queues for that but you can actually allocate your task in DispatchWorkItem class and based on your logical or business condition cancel it whenever you see fit.
In this video, we will be seeing a real project scenario where you can use DispatchWorkItem to cancel and task and to optimize an existing module. We will learn how we can use the debounce technique and improve our code with DispatchWorkItem and DispatchQueue.

Given are the chapters covered in this video

0:00 introduction
0:14 prerequisite
0:48 complain about gcd
1:16 dispatchWorkItem class
1:23 codecat15 example
2:03 Pseudocode dispatchWorkItem
2:24 dispatchWorkItem example
4:45 dispatchWorkItem cancel example
8:51 real project scenario for using dispatchWorkItem
10:25 issue with the current implementation
11:02 debounce explanation
11:40 implementing debounce approach
12:48 need for work item reference explained
13:26 creating a work item reference
13:59 code explanation
14:36 debounce in action
16:00 conclusion

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

✅ Subscribe to the channel and stay ahead of everyone by following the right way for writing clean code in swift. 🔥🔥🔥🔥🔥

🔗Click on the link to subscribe: https://www.youtube.com/c/codecat?sub_confirmation=1

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Introduction to threading video link: https://youtu.be/OKfv_0FvEf0

-----------------------------------------------------------------------------------------------------------------------
📥 Download the source code from

Note: The playground code shown in the video is also included
Github: https://github.com/codecat15/Youtube-tutorial/tree/master/DispatchWorkItemDemo

Google Drive: https://drive.google.com/file/d/1Z5goc3pFUUTUHR5p3bsJ4glWkWBaloKu/view?usp=sharing
-----------------------------------------------------------------------------------------------------------------------

############################################

Connect with me on social media
📷:: https://www.instagram.com/codecat15/
📧: codecat15@gmail.com
🐦: https://twitter.com/codecat15
Facebook: https://www.facebook.com/code.cat.792
Github: https://github.com/codecat15

###########################################
#dispatchWorkItem #gcd #threadingInSwift

Видео Cancel task in Grand Central Dispatch GCD with DispatchWorkItem in Swift Hindi tutorial канала Code Cat
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
31 января 2021 г. 9:30:03
00:16:22
Яндекс.Метрика