线程中的问题-C语言(非C ++) [英] A Question in Threads - C language (not C++)

查看:72
本文介绍了线程中的问题-C语言(非C ++)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我写道以下代码:

Hi, 

I wrote the following code:

代码:

推荐答案

此代码中有许多错误.最明显的一个是在打印结果之前不等待线程完成.尝试调用WaitForSingleObject(ReadPicThread,INFINITE);

There are many bugs in this code. The most obvious one is not waiting for the thread to finish before printing the results. Try to call WaitForSingleObject(ReadPicThread, INFINITE); before the printf.


这篇关于线程中的问题-C语言(非C ++)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆