How to use pthread
来源:互联网 发布:深圳数据分析师培训 编辑:程序博客网 时间:2024/06/05 23:43
How to use pthread
Now, you can use pthread in cocos2d-x, but there are some limitations.
1. Don't call functions that invoke retain(), release() or autorelease(), because they are not thread-safe.
cocos2d-x use these functions every where, so don't invoke any engine code in a new thread.
2. If you want to load resources in a new thread, you can use CCTextureCache::addImageAsync().
3. pthread_cond_wait() seems have a bug, it can not wait at first time.
If we make retain(), release() and autorealese() thread-safe, then we should use mutex. Because engine
releases the autorelease pool after drawing a frame, then it may cause performance issue. By the way,
opengle context is not thread-safe.
- How to use pthread
- How to use pthread
- How to use pthread in cocos2d-x
- 如何在QT for S60 中使用pthread库(Carbide.c++) (How to use pthread in QT4.6 for S60)
- How To Use DataGird
- how to use typedef
- how to use gz
- How to use chkconfig
- How to use ,,,,
- how to use dialog
- How to use UIDs
- How to use dmalloc
- How to use abld
- How to use BSTR
- How to use Ant
- how to use mstsclib
- how to use gcc
- how to use thread
- [camera drv]工厂模式下测试camera fail
- 时间计算工具类(加/减)
- linux进程状态D
- 简单的日志记录
- PHP为什么会被认为是草根语言?
- How to use pthread
- 关于android的camera平滑切换问题
- 字符串操作(人民币转成大写/全角字符转半角字符/去掉字符串中重复的子字符串/过滤常见特殊字符/反过滤特殊字符/判断是不是合法手机/字符串匹配的算法)
- 走出浮躁的泥沼:关于技术与工作
- redis 源代码之数据结构(4)--zipmap实现
- PYTHON类中“__”和“_”用法小记
- 所有的数据库连接字符(connectionstring)
- hadoop2.0之HDFS集群管理:HeartbeatManager及其报告周期问题
- jquery easyui 获取select 的值