我想以正确的方式运行以下代码:
public func function1() {
Task {
await asyncFunc()
// asyncFunc is a async function we wouldn't like to wait till it finish, we would like it to run in the background
}
}
此功能有效但会导致内存泄漏 我想在应用程序后台运行异步功能
asyncFunc