2013年1月25日

onSaveInstanceState和onRestoreInstanceState相关知识

该文被密码保护。 阅读全文

posted @ 2013-01-25 20:14 Cynthia&Sky 阅读(30) 评论(0) 推荐(0)

线程取消(pthread_cancel)

摘要: 基本概念pthread_cancel调用并不等待线程终止,它只提出请求。线程在取消请求(pthread_cancel)发出后会继续运行,直到到达某个取消点(CancellationPoint)。取消点是线程检查是否被取消并按照请求进行动作的一个位置.与线程取消相关的pthread函数int pthread_cancel(pthread_t thread)发送终止信号给thread线程,如果成功则返回0,否则为非0值。发送成功并不意味着thread会终止。int pthread_setcancelstate(int state, int *oldstate) 设置本线程对Cancel信号的反应, 阅读全文

posted @ 2013-01-25 19:22 Cynthia&Sky 阅读(76309) 评论(0) 推荐(5)

导航