donnywals,
@donnywals@chaos.social avatar

Due to a mistake in my testing setup, I included a mistake in my article on async functions.

The mistake is I wrote that if we have a non-async function that spawns a Task, we depend on the callsite's actor isolation to determine whether the new Task runs on the main actor.

Turns out that's not the case. I observed that the spawned Task is never main actor isolated even when callsite is.

I assume that that's because there's no actor isolation applied to the function.

https://www.donnywals.com/how-to-determine-where-tasks-and-async-functions-run-in-swift/

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • everett
  • osvaldo12
  • magazineikmin
  • thenastyranch
  • rosin
  • normalnudes
  • Youngstown
  • Durango
  • slotface
  • ngwrru68w68
  • kavyap
  • mdbf
  • InstantRegret
  • JUstTest
  • ethstaker
  • GTA5RPClips
  • tacticalgear
  • Leos
  • anitta
  • modclub
  • khanakhh
  • cubers
  • cisconetworking
  • megavids
  • provamag3
  • tester
  • lostlight
  • All magazines