I'm writing a test in Swift. The function that I'm testing blocks the current thread so I want to run it on the background. Previously I would wrap it in DispatchQueue.global.async {}.
With Swift's new structured concurrency, I found Task.detached. However, the notes on it say
Creating detached tasks should, generally, be avoided in favor of using
asyncfunctions,async letdeclarations andawaitexpressions
Is there another Apple recommended way to start something asynchronously when it doesn't have the async flag?