xcode上的简单线程
来源:互联网 发布:华为怎么卸载软件 编辑:程序博客网 时间:2024/06/09 17:24
void* myThread(void* data)
{
int i;
for(i=0;i<3;i++)
{
NSLog(@"the myThread = %d",i);
}
return NULL;
}
void debugThread()
{
pthread_t threadid;
int i,ret;
ret = pthread_create(&threadid, NULL, &myThread, NULL);
NSLog(@"the ret = %d",ret);
if(ret!=0)
{
for(i=0;i<3;i++)
{
NSLog(@"the debugThread = %d",i);
}
pthread_join(threadid, NULL);
}
{
int i;
for(i=0;i<3;i++)
{
NSLog(@"the myThread = %d",i);
}
return NULL;
}
void debugThread()
{
pthread_t threadid;
int i,ret;
ret = pthread_create(&threadid, NULL, &myThread, NULL);
NSLog(@"the ret = %d",ret);
if(ret!=0)
{
printf
(
"Create pthread error!/n"
);
}for(i=0;i<3;i++)
{
NSLog(@"the debugThread = %d",i);
}
pthread_join(threadid, NULL);
}
0 0
- xcode上的简单线程
- Xcode上的VIM
- 线程池在web上的简单应用
- 线程池在web上的简单应用
- Xcode 上的邮箱发送
- xcode 简单控件的使用
- xcode + lldb简单的调试
- .Net上的线程
- Xcode -- 关于Xcode上的Other linker flags
- mac上xcode链接不上windows上的svn
- mac上xcode链接不上windows上的svn
- [XCode] XCode 6 中 UIPickerView 的简单示例
- 简单的线程池
- 线程的简单介绍
- 线程的简单实现
- 简单的线程池
- 简单的线程
- 简单的线程程序
- Unity3d网络游戏Socket通讯
- 二十
- 《linux 内核完全剖析》 keyboard.S 部分代码分析(key_map)
- android应用开发实践三----Atcity 通过Intent 来启动另一个Activity来实现简易拨号
- ThinkPHP3的输出和使用
- xcode上的简单线程
- RMQ 模板
- getsockopt的TCP层实现剖析
- linux 0.11版本内核中信号signal()和sigaction()的区别
- 《一问一世界》 杨澜
- openCV-傅里叶变换
- Oracle EBS R12 - Steps and Issues/Resolutions during R12.1.1 to R12.1.3 Upgration
- android中如何在SD卡上进行文件读写操作
- http文件下载