多线程 NSThread
来源:互联网 发布:淘宝改版中国质造 编辑:程序博客网 时间:2024/06/11 09:57
Parameters
- aSelector
The selector for the message to send to the target. This selector must take only one argument and must not have a return value.
This selector 只能带一个参数,并且This selector 线程入口方法没有返回值
- aTarget
The object that will receive the message aSelector on the new thread.
- anArgument
The single argument passed to the target. May be
nil
.作为单一参数传递给target,也可以是nil;
Discussion
For non garbage-collected applications, the method aSelector is responsible for setting up an autorelease pool for the newly detached thread and freeing that pool before it exits. Garbage-collected applications do not need to create an autorelease pool.
如果应用程序没有垃圾回收机制,则aSelector必须为新开启的线程建立一个autorelease pool并且在线程推出前释放掉pool,有垃圾回收机制的应用程序则不需要创建autorelease pool。
The objects aTarget and anArgument are retained during the execution of the detached thread, then released. The detached thread is exited (using the exit
class method) as soon as aTarget has completed executing theaSelector method.
在线程执行期间,aTarget和anArgument都将被retained,然后released掉。一旦aTarget执行完线程方法中的命令,这个线程就将使用类方法exit退出关闭;
If this thread is the first thread detached in the application, this method posts theNSWillBecomeMultiThreadedNotification
with object nil
to the default notification center.
如果这个线程是应用程序中首个被启用的线程,它将投递一个带nil参数的NSWillBecomeMultiThreadNotification通知到默认的通知中心。
- 多线程 NSThread
- 多线程 NSthread
- NSThread 多线程
- 多线程-NSThread
- 多线程:NSThread
- 多线程NSthread
- 多线程NSThread
- 多线程NSThread
- 多线程----> NSThread
- 多线程:NSThread
- 多线程NSThread
- 多线程-NSthread
- 多线程-NSThread
- NSThread 多线程编程
- 多线程NSThread用法:
- iOS 多线程 NSThread
- 多线程NSThread讲解
- iphone的多线程NSThread
- ubuntu 备份还原
- UtilBox基础组件
- HDU-1698(线段树入门)
- java 远程调试butterfly
- Warning: The Copy Bundle Resources build phase contains this target's Info.plist file 'Info
- 多线程 NSThread
- java实现标点全角/半角转换
- 关于sfo的备注和bo的备注字段
- 【动态规划】背包问题
- 读书笔记整理八:智能基础结构增强功能11g
- 程式中打开windows上本机已存在的服务
- 百度手机地图升级“彩色蚯蚓”
- 线段相交:Intersection
- 计时器(2)之数字时钟