Тёмный

Actor Reentrancy in Swift explained 

donny wals
Подписаться 2,2 тыс.
Просмотров 2,1 тыс.
50% 1

Опубликовано:

 

29 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 10   
@AcidUser
@AcidUser 10 дней назад
Really good example, thank you! I learned a lot and think more in this new async/await way now instead of thinking in queues 😁
@michaellatta
@michaellatta 23 дня назад
I avoided actors at the beginning because they were repentant in ways that broke my mental model. After watching apple’s concurrency video with the islands several times the phrase that clicked was that the serialization mechanism was tasks. So, rather than doing complex threading models or queuing work to run in the background I just create tasks from the UI and call actor methods for background work. This usage reduces the reentrancy issues as the control flow is in single tasks. If I need to spawn long running background tasks (detached) this will again raise the reentrancy issues.
@paccini1
@paccini1 Месяц назад
Great explanation and good catch about Actor reentrancy.
@srinivasanmunna
@srinivasanmunna 5 месяцев назад
This is a great one. I was actually expecting to see another dictionary variable that keeps track of running tasks. But the enum with associated type looks so much better.
@DonnyWalsdev
@DonnyWalsdev 5 месяцев назад
Thanks!
@0xifarouk
@0xifarouk 5 месяцев назад
This is amazing, thank you for the explanation 🙏🏻 Can we have a video on task cancellation please?
@DonnyWalsdev
@DonnyWalsdev 5 месяцев назад
Noted!
@bobgodwinx
@bobgodwinx 2 месяца назад
Great content here. Thanks for sharing. this trick actually applies to a lot of problems.
@filmaniac1984
@filmaniac1984 5 месяцев назад
Thanks @DonnyWalsdev! Great example and well explained.
@JumpingCow
@JumpingCow 5 месяцев назад
Subtle and complex! Thank you.
Далее
How to determine where code runs in Swift Concurrency
12:42
Using Closures as Dependencies
15:18
Просмотров 1,2 тыс.
9. SwiftData Storing Images and Bug Fixes
23:15
Просмотров 4,1 тыс.
Understanding Ownership in Rust
25:30
Просмотров 257 тыс.
All Rust features explained
21:30
Просмотров 310 тыс.
My 10 “Clean” Code Principles (Start These Now)
15:12