线程的优先级
2015-09-07 15:03
399 查看
NSThread *t1 = [[NSThread alloc] initWithTarget:self selector:@selector(createThreadOne) object:nil]; t1.name = @"线程A"; //修改优先级 t1.threadPriority = 0; [t1 start]; NSThread *t2 = [[NSThread alloc] initWithTarget:self selector:@selector(createThreadTwo) object:nil]; t2.name = @"线程B"; t2.threadPriority = 1; [t2 start];
相关文章推荐
- mac系统如何显示和隐藏文件.DS_Store
- ListView中的点击事件
- 有多少人输在了这个字上……
- Java中易错的一些小知识点
- Axure样式编辑器与变量管理
- json和jsonp的传输方式
- MITM Proxy环境搭建
- Tomcat 处理请求时的中文乱码问题
- collectionView瀑布流
- mysql 备份日检
- FlexGrid简单demo
- emacs key definition
- 将字符串形式的日期转换成日期对象
- sql server查询表的字段名和字段类型
- KVM Error:list.remove(x):x not in list
- 一个人的战斗
- Ember.js 入门指南——扩展(reopen)
- Ember.js 入门指南——扩展(reopen)
- 导入的项目,很多代码都提示错误
- zabbix安装-----linux下安装和配置mysql(编译安装)