gpt4 book ai didi

iphone - 线程与异步调用

转载 作者:行者123 更新时间:2023-11-29 05:05:29 25 4
gpt4 key购买 nike

我想知道生成线程或使用 NSURLConnection 类进行异步调用之间的最佳选择。

最佳答案

参见 the documentation .

An NSURLConnection object provides support to perform the loading of a URL request. The interface for NSURLConnection is sparse, providing only the controls to start and cancel asynchronous loads of a URL request.

即NSURLConnection 支持内容的异步加载。甚至是sendSynchronousRequest:returningResponse:error:方法实际上只是异步加载的包装,在完成之前会阻塞。

该类引用包含编程指南和大量示例的链接。

关于iphone - 线程与异步调用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5445605/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com