Actor keyword in swift can be used to handle data races, actor completely isolates the shared resource and memory. Actors are not locks and hence one should not compare them with locks like dispatch semaphore or barriers in swift.
We will also have a look at the Xcode settings named thread sanitizer which can be used to identify the data race and make your app more stable.
Give are the chapters covered in today’s session
0:00 introduction
0:38 data race and race condition
1:05 data race
3:02 example of data race
5:35 using dispatch barrier to solve data race
6:35 issues with lock-based synchronization
7:32 actor keyword
8:43 actor vs class
9:20 implementing actor
10:45 codecat15 example
12:03 using task struct for async
12:53 data race vs race condition
13:47 async/await stack corruption bug
14:27 thread sanitizer
16:31 comments/feedback and subscribe
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
✅ 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: ru-vid.com?sub...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----------------------------------------------------------------------------------------------------------------------
📥 Download the source code from
GitHub: github.com/codecat15/RU-vid-...
Google Drive: drive.google.com/file/d/1B5Bu...
-----------------------------------------------------------------------------------------------------------------------
Given are the links discussed in the video
Introduction to threading: • Threads in iOS Swift T...
Dispatch semaphore: • Dispatch semaphore and...
Deadlocks: • Deadlock with Dispatch...
Priority inversion: • Priority Inversion wit...
Swift async/await stack corruption bug: forums.swift.org/t/swift-5-5-...
############################################
Connect with me on social media
Instagram: / codecat15
📧: codecat15@gmail.com
🐦: / codecat15
Facebook: / code.cat.792
Github: github.com/codecat15
###########################################
#actorsInSwift #actorSwiftHindiTutorial #swifTutorial
30 июн 2024