Alamofire を含む SPM で作成された非常に単純な迅速なプロジェクトを使用しています。
main.swift:
import Alamofire
Alamofire.request("https://google.com").responseString(queue: queue) { response in
print("\(response.result.isSuccess)")
}
ロックを使用しない場合、クロージャーは実行されません。終了する前にすべてのスレッドまたはその特定のスレッドを待機するように指示する方法はありますか?
これは Playgrounds を使用して簡単に実現できることは承知しています。