Concurrency of SwiftData, by Donny Wals (English)

Поделиться
HTML-код
  • Опубликовано: 13 окт 2024
  • This talk saw the light by accident but Donny explores the concurrency features of the SwiftData API and shows us what does and what does not work.

Комментарии • 7

  • @RFIHW
    @RFIHW 18 дней назад

    I tried leak inspector and this way, creating actor in a detached task and insert data, will still cause a leak. I believe it has no essential different with that you send container to a background thread and create a context from the container and then insert data.

  • @slmille4
    @slmille4 5 месяцев назад

    This is great, if SwiftData is a Core Data wrapper, ModelContexts are backed by NSManagedObjectContexts, and ModelObject are backed by NSManagedObjects, it should be possible to listen for NSManagedObjectContextDidSave events on the viewContext. But now I'm curious how the NSManagedObjects that the event receives are defined, especially in regards to the more Swift compatible SwiftData types...

    • @RFIHW
      @RFIHW 18 дней назад

      BTW, SwiftData ModelContext.didSave and willSave failed to received notification which struggle me a lot. Need help!

  • @grzymsiu
    @grzymsiu 9 месяцев назад

    What is the best solution for relations in swiftdata? If i want to sync with API which is running regular sql db like postgres, but swiftdata's relation will be a tab with objects. Should i write a custom logic while syncing all my tables to insert data in proper way to avoid ugly nestings and duplicates of data in my json file?

  • @ammarahmad9004
    @ammarahmad9004 5 месяцев назад

    When you set "Strict Concurrency Check" to "Complete", you will get a warning the message "Non-sendable type returned by call to actor-isolated function cannot cross actor boundary", How can void this.

  • @lapusan2008
    @lapusan2008 8 месяцев назад

    Nice!

  • @chezchezchezchez
    @chezchezchezchez 2 месяца назад

    The breathing is strong with this one.