How can I safely use a non-sendable object in an async context?

My minimum deployment target is 17.0 so that's OK. I wasn't able to get nonisolated(unsafe) to work—it seems that's only used for annotating properties, not functions? I used the assumeIsolatedHack shared by @Karl . I will remove it when I drop iOS 17 support next year.