Post

Replies

Boosts

Views

Activity

Comment on Struggling with async/await: Fetching an image off the main thread
@DTS Engineer – I get what you intended re your four options (ensure that the function is not isolated to the main actor) but for the sake of future readers, that alone is insufficient. A nonisolated synchronous function will just run on the current thread. I just wanted to draw readers attention to the key observation that you made this both nonisolated and async, to get it off the current actor.
1w
Comment on Swift 6 Concurrency Errors with MKLocalSearchCompleterDelegate results
Note: A frequent flow consists of the use of MKLocalSearchCompleter for list of completions, and then when one is selectsd, then create a MKLocalSearch.Request from that. In that case, the above pattern introduces a problem that you no longer have a MKLocalSearchCompletion to pass to MKLocalSearch.Request. There are workarounds, so if you want to see example, let me know. Hopefully they will soon fix MKLocalSearchCompleter to support strict concurrency and avoid all this silliness.
1w
Comment on Cannot run Animation Hitches Instrument
I think it’s broader than just the “hitches” instrument. I think “deferred” mode is broken for all instruments on physical devices. E.g., “Time Profiler” template manifests the same problem if you select “deferred” mode when profiling on iOS 18.1 physical device (but not simulator). I confess that I’ve only tested on iOS 18.1, but I don’t know if it applies to other iOS versions or not.
1w
Comment on Is there an equivalent of DispatchQueue.concurrentPerform() with the new async/await?
I agree re concurrency not being the same thing as parallelism. But you appear to suggest that one cannot achieve parallelism with a task group. But we do (and we avoid the thread explosion issues of queue.async while simultaneously enjoying structured concurrency benefits). All of my recent computationally intensive and massively parallel tests demonstrate that task group performance is indistinguishable from concurrentPerform. Help me understand why not task group? I see no downside.
Sep ’22
Comment on How to specify symbol/character in os-signpost-point-schema
That’s exactly what I was looking for. I was assuming it was a separate property, not one tied to the event-concept. I’m actually already using the event-concept (which is how I rendered the colored events). Anyway, I posted a question on StackOverflow, too, (https://stackoverflow.com/questions/70600250/how-to-specify-symbol-character-in-os-signpost-point-schema/70659365#70659365) and have reposted your answer there. But obviously, if you’d rather post your own answer there to get the due credit, I’m happy to delete my answer and instead award you the bounty points! I’m happy either way.
Jan ’22