iOS多线程开发(三)---Run Loop(一)
Run Loop
表1-1列出了cocoa和Core Foundation预先定义的模式。
Table:Performing selectors on other threads
Methods |
Description |
performSelectorOnMainThread:withObject: waitUntilDone: performSelectorOnMainThread:withObject: waitUntilDone:modes: |
Performs the specified selector on the application’s main thread during that thread’s next run loop cycle. These methods give you the option of blocking the current thread until the selector is performed. |
performSelector:onThread:withObject:waitUntilDone: performSelector:onThread:withObject: waitUntilDone:modes: |
Performs the specified selector on any thread for which you have an NSThread object. These methods give you the option of blocking the current thread until the selector is performed. |
performSelector:withObject:afterDelay: performSelector:withObject:afterDelay:inModes: |
Performs the specified selector on the current thread during the next run loop cycle and after an optional delay period. Because it waits until the next run loop cycle to perform the selector, these methods provide an automatic mini delay from the currently executing code. Multiple queued selectors are performed one after another in the order they were queued. |
cancelPreviousPerformRequestsWithTarget: cancelPreviousPerformRequestsWithTarget: selector:object: |
Lets you cancel a message sent to the current thread using theperformSelector:withObject:afterDelay: orperformSelector:withObject:afterDelay: inModes:method. |
转载于:https://www.cnblogs.com/luqinbin/p/5154206.html
iOS多线程开发(三)---Run Loop(一)相关推荐
- ios多线程开发的常用三种方式
ios多线程开发的常用三种方式 1.NSThread 2.NSOperationQueue 3.GCD NSThread: 创建方式主要有两种: [NSThread detachNewThreadSe ...
- IOS多线程开发详解
概览 大家都知道,在开发过程中应该尽可能减少用户等待时间,让程序尽可能快的完成运算.可是无论是哪种语言开发的程序最终往往转换成汇编语言进而解释成机器码来执行.但是机器码是按顺序执行的,一个复杂的多步操 ...
- ios跨线程通知_iOS多线程编程指南(三)Run Loop
Run loops是线程相关的的基础框架的一部分.一个run loop就是一个事件处理的循环,用来不停的调度工作以及处理输入事件.使用run loop的目的是让你的线程在有工作的时候忙于工作,而没工作 ...
- iOS多线程开发:几个容易被忽略的细节(马甲包)
一般情况下,iOS开发者只要会使用GCD.@synchronized.NSLock等几个简单的API,就可以应对大部分多线程开发了,不过这样是否真正做到了多线程安全,又是否真正充分利用了多线程的效率优 ...
- iOS多线程开发:几个容易被忽略的细节
一般情况下,iOS开发者只要会使用GCD.@synchronized.NSLock等几个简单的API,就可以应对大部分多线程开发了,不过这样是否真正做到了多线程安全,又是否真正充分利用了多线程的效率优 ...
- IOS多线程开发其实很简单
http://blog.csdn.net/shenjie12345678/article/details/44152605 转载于:https://blog.51cto.com/8399249/165 ...
- iOS开发-多线程开发之线程安全篇
前言:一块资源可能会被多个线程共享,也就是多个线程可能会访问同一块资源,比如多个线程访问同一个对象.同一个变量.同一个文件和同一个方法等.因此当多个线程访问同一块资源时,很容易会发生数据错误及数据不安 ...
- iOS多线程详解:实践篇
iOS多线程实践中,常用的就是子线程执行耗时操作,然后回到主线程刷新UI.在iOS中每个进程启动后都会建立一个主线程(UI线程),这个线程是其他线程的父线程.由于在iOS中除了主线程,其他子线程是独立 ...
- ios跨线程通知_iOS多线程开发(三)---Run Loop(一)
Run Loop Run Loop就是一个事件处理的循环,用来不停的调动工作以及处理输入事件.使用Run Loop的目的就是节省CPU效率,线程在有工作的时候忙于工作,而没工作的时候处于休眠状态. 一 ...
最新文章
- MultiObjective using Evolutionary Algorithms (2) -- Multi-Objective Optimization
- linux中find命令列举,Linux中常见find命令的使用
- 利用Sqoop将MySQL海量测试数据导入HDFS和HBase
- POJ - 1220 NUMBER BASE CONVERSION(高精度运算+进制转换+模拟)
- Java路径问题最终解决方案—可定位所有资源的相对路径寻址
- Linux下怎么创建和进入带有空格的文件夹
- thinkphp 助手函数url不生成https_如何用ThinkPHP框架写一个快递查询接口
- Doc2Bow简介与实践Demo
- 二级c语言笔试58,全国计算机等级考试-二级C语言笔试试题.doc
- java获取页面点击次数_java计算鼠标点击次数的题,急求!
- vba ado返回集合_利用VBA代码导出工作表中的图片
- 多线程java_由浅入深地介绍Java多线程,让你如何快速进入Java多线程的学习
- python识别中文中的名字地点时间_python中判断时间间隔的问题
- iOS设计模式之代理模式
- 基于STM32F405平台的多摩川协议编码器通讯过程(1)
- JAVAWEB-NOTE03
- 2018.09.02【BZOJ2227】【ZJOI2011】看电影 (高精度)(组合数)
- 第二人生的源码分析(12)天空显示的实现
- response.getStatusCode()==200什么意思
- dhtml gantt所有配置_dhtmlx-gantt相关配置
热门文章
- JZOJ 5415. 【NOIP2017提高A组集训10.22】公交运输
- Hdu 1754 . I Hate It
- JZOJ 1251. 收费站
- vs五子棋c语言代码,五子棋代码C语言版.doc
- pythonexcel表格教程_python对excel表格的操作
- 鸿蒙手机系统开发大会,鸿蒙OS+EMUI10,华为开发者大会的创新与看点
- 微软亚洲研究院发布“人立方关系搜索”
- NOIP2015年普级组试题 金币
- Codeforces 1188 题解
- BZOJ 2669 Luogu P3160 [CQOI2012]局部极小值 (容斥原理、DP)