Actor Reentrancy in Swift explained

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ต.ค. 2024

ความคิดเห็น • 10

  • @AcidUser
    @AcidUser 26 วันที่ผ่านมา

    Really good example, thank you! I learned a lot and think more in this new async/await way now instead of thinking in queues 😁

  • @paccini1
    @paccini1 หลายเดือนก่อน +1

    Great explanation and good catch about Actor reentrancy.

  • @michaellatta
    @michaellatta หลายเดือนก่อน

    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.

  • @0xifarouk
    @0xifarouk 6 หลายเดือนก่อน +1

    This is amazing, thank you for the explanation 🙏🏻
    Can we have a video on task cancellation please?

  • @bobgodwinx
    @bobgodwinx 3 หลายเดือนก่อน

    Great content here. Thanks for sharing. this trick actually applies to a lot of problems.

  • @srinivasanmunna
    @srinivasanmunna 6 หลายเดือนก่อน +2

    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.

  • @filmaniac1984
    @filmaniac1984 5 หลายเดือนก่อน

    Thanks @DonnyWalsdev! Great example and well explained.

  • @JumpingCow
    @JumpingCow 6 หลายเดือนก่อน

    Subtle and complex! Thank you.