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

在域名上建设网站创意设计公司排行榜

在域名上建设网站,创意设计公司排行榜,网站安全注意哪些问题吗,奖励网站源码好的, 现在简单的写一个例子, 1、线程函数 函数int runThread(void *arg) 做为一个thread,实现简单的打印信息功能。 2、在int testSimpleThread()中, thrd_create(),创建线程。三个参数粉分别是thrd_t&#xff0c…

好的, 现在简单的写一个例子,

1、线程函数

函数int runThread(void *arg)

做为一个thread,实现简单的打印信息功能。

2、在int testSimpleThread()中,

  1. thrd_create(),创建线程。三个参数粉分别是thrd_t,线程函数,线程的参数。
  2. thrd_join(),等待进程结束。

可以直接在main()调用这个函数,做个简单的实验。

注意:本篇主要是在Windows下实现多进程的验证学习,所以GetCurrentThreadId()是Windows专属的函数,要是在Mac或者Linux下面,要注意兼容性,回头再做讨论。

#include "tinycthread.h"int runThread(void *arg)
{const char *threadName = "Thread1";const char *threadMsg = (const char *)arg;unsigned long threadId = (unsigned long)GetCurrentThreadId();printf("Thread %s(%lu): %s\n", threadName, (unsigned long)threadId, threadMsg);return 0;
}int testSimpleThread()
{thrd_t thread;const char *threadMsg = "Hello from thread!";// create a threadint result = thrd_create(&thread, runThread, (void *)threadMsg);if (result != thrd_success){printf("Failed to create thread.\n");return -1;}int threadResult;if (thrd_join(thread, &threadResult) != thrd_success){printf("Failed to join thread.\n");return -1;}printf("Thread exited with: %d\n", threadResult);return 0;
}

http://www.yayakq.cn/news/49673/

相关文章:

  • 网站备案 公司中国商标买卖网站
  • 北京58网站建设做配色的网站
  • 秘鲁网站后缀自己做网站 教程
  • 多说与网站账号绑定中学网站建设工作实施方案
  • 网站开发费用多少免费发帖的网站
  • 有没有做ppt好看的免费网站小程序api手册
  • asp.net做购物网站wordpress 主题演示
  • 买了虚拟主机怎么做网站响应式网站设计的现状
  • 玉林住房和城乡建设部网站四川红叶建设有限公司网站
  • 游戏推广网站如何做的wordpress外链提示插件
  • 网站设计亮点公司企业墙设计
  • 做外贸网站建设空包网站做红章底单
  • 怎么做外网的网站wordpress autopost
  • 单机网页游戏网站网站前端做报名框代码
  • 怎样联系自己建设网站网络营销都有哪些方法
  • 网站的设计过程怎么提高网站排名
  • ui模板网站网络管理系统的基本组件包括哪些
  • 网站建设综合实践 教材用手机制作视频的软件
  • 个人网站建设 优帮云整站外包优化公司
  • 住建部官方网站央视叫停校外培训机构
  • 建模外包网站注册一个公司一年需要多少钱
  • opencart做的网站网站建设前提
  • 烟台高新区网站为公司建立网站
  • 网站建设招标文件范本百度推广优化中心
  • 广东做网站的公司有哪些cms网站制作
  • jsp网站开发关键技术贵阳网站建设功能
  • 论坛网站怎么做跳转企业形象设计调研报告
  • ftp如何备份网站服务器上网站打不开
  • 做网站选云服务器内核上海市公共资源交易平台
  • 网站开发人员属于什么wordpress页面标题标签