当前位置: 首页 > news >正文

生鲜网站建设规划书网页小游戏插件不支持

生鲜网站建设规划书,网页小游戏插件不支持,wordpress 近期文章 修改,做网站需要编码吗问题#xff1a;编写程序完成如下功能#xff1a;程序创建2个线程#xff0c;然后#xff1a; 1 主线程先打印“I am main thread”#xff0c;然后睡眠2秒后#xff0c;打印main thread wake up,主线程退出 2 第一个新线程先打印“…问题编写程序完成如下功能程序创建2个线程然后         1 主线程先打印“I am main thread”然后睡眠2秒后打印main thread wake up,主线程退出         2 第一个新线程先打印“I am the first new thread”然后睡眠3秒后打印the first new thread wake up退出         3 第二个新线程先打印“I am the second new thread”然后睡眠5秒后打印the fsecond new thread wake up退出     要求能看到所有打印信息 代码 #include stdio.h #include stdlib.h #include unistd.h #include unistd.h #include pthread.h #include assert.h #include sys/types.h #include sys/stat.h #include fcntl.hvoid *fun1(){printf(I am the first new thread\n);sleep(3);printf(the first new thread wake up\n);return NULL; }void *fun2(){printf(I am the second new thread\n);sleep(5);printf(the second new thread wake up\n);return NULL; }int main(int argc,char *argv[]){pthread_t id[2];int ret 0;ret pthread_create(id[0],NULL,fun1,NULL); // thread1ret pthread_create(id[1],NULL,fun2,NULL); // thread2if(ret){printf(pthread_create failed\n);return 1;}printf(I am main thread\n); // main threadsleep(2);printf(main thread wake up\n);pthread_exit(NULL); // main thread exitpthread_join(id[0],NULL); // thread1 exitpthread_join(id[1],NULL); // thread2 exitreturn 0; } 输出
http://www.dnsts.com.cn/news/220396.html

相关文章:

  • 黄冈网站建设推荐电商小白如何做网店运营
  • 高端网站建设公司哪家服务态度好淘宝客怎么自建网站做推广
  • 推广型网站建设电话大型外贸网站建设
  • 找个免费的网站这么难吗界首网站建设
  • 陕西省城乡建设学校网站毕业设计网站建设英文文献
  • 景区网站如何建设在线域名查询网站
  • 代理网站系统山东专业网站建设公司
  • 怎么实现网站注册页面wordpress关闭在线修改主题
  • 做网站发广告云奇网站建设
  • wordpress登录页面空白做seo哪些网站会好点
  • 自己做剧本网站wordpress 重定向
  • 免费发群二维码的网站wordpress wp editor
  • 公司做网站需要哪些费用做阀门销售在哪个网站上做好
  • 好人一生平安网站哪个好西峡微网站开发
  • 长沙建站公司模板苏州 做网站
  • 汉南公司网站建设百度推广费用
  • 搭建自己的网站需要什么陕西高端建设网站
  • 网站建设鼠标点击变色怎么弄好听的公司名称
  • 太原零元网站建设东莞市网络seo推广怎么样
  • 自己做网站模板wordpress安装创建数据库文件
  • php网站建设思路方案做网站用什么后台
  • 献县建设局网站网络营销促销活动方案
  • 什么是php网站开发php7 wordpress
  • 最好的网站设高唐网站建设
  • 咸宁网站seo装潢设计报价
  • 辽宁省建设工程注册中心网站开发一套软件app
  • 男女做微电影网站自己怎么做电影网站
  • 做机械的专业外贸网站有哪些网页设计实训总结与展望150字
  • 搭建本地视频网站网站开发 平均工资
  • 太原做网站多少钱wordpress接入官方号