为什么我看到多个"螺纹0x22c8已退出与code 259(0x103)QUOT。信息 [英] Why am I seeing multiple "The thread 0x22c8 has exited with code 259 (0x103)." messages

查看:957
本文介绍了为什么我看到多个"螺纹0x22c8已退出与code 259(0x103)QUOT。信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到这些消息摆在我的WinForms应用程序,尽管我从来没有明确提出任何线程。这究竟是为什么?我环顾四周,一个解释,但它很难字像这样的询问。

我使用视觉工作室2013,这是调试输出,我很担心:

 线程0x23a4已退出与code 259(0x103)。
线程0x2884已退出与code 259(0x103)。
线程0x27ec已退出与code 259(0x103)。
线程0x1978已退出与code 259(0x103)。
线程0x1534已退出与code 259(0x103)。
线程0x1ad8已退出与code 259(0x103)。
线程0x2938已退出与code 259(0x103)。
线程0x22c8已退出与code 259(0x103)。


解决方案

从MSDN文档:


  

备注


  
  

该函数立即返回。如果指定的线程没有
  终止函数成功,返回的状态是
  STILL_ACTIVE。如果线程已终止和函数成功,
  返回的状态是以下值之一:退出值
  在了ExitThread或TerminateThread函数指定。回报
  从线程函数值。线程的出口值
  处理。重要提示GetExit codeThread函数返回一个有效
  只有线后,由应用程序定义的错误code
  终止。因此,应用程序不应使用STILL_ACTIVE
  (259)为错误code。如果一个线程返回STILL_ACTIVE(259)作为
  错误code,是检验这种价值可以跨preT它的应用程序
  意味着线程仍在运行,并继续测试对于
  线后的线程的完成已终止,这可能
  把应用程序进入一个无限循环。


所以基本上它仍然不时检查当前线程的时间。

这似乎是一个错误:

<一个href=\"http://connect.microsoft.com/VisualStudio/feedback/details/812144/vs2013-reports-incorrect-thread-exit-$c$c\">http://connect.microsoft.com/VisualStudio/feedback/details/812144/vs2013-reports-incorrect-thread-exit-$c$c

I'm getting a slew of these messages in my Winforms application even though I never explicitly made any threads. Why is this happening? I've looked around for an explanation but it's hard to word an inquiry like this.

I'm using Visual Studios 2013 and this is the debug output that I'm concerned about:

The thread 0x23a4 has exited with code 259 (0x103).
The thread 0x2884 has exited with code 259 (0x103).
The thread 0x27ec has exited with code 259 (0x103).
The thread 0x1978 has exited with code 259 (0x103).
The thread 0x1534 has exited with code 259 (0x103).
The thread 0x1ad8 has exited with code 259 (0x103).
The thread 0x2938 has exited with code 259 (0x103).
The thread 0x22c8 has exited with code 259 (0x103).

解决方案

From MSDN Documentation:

Remarks

This function returns immediately. If the specified thread has not terminated and the function succeeds, the status returned is STILL_ACTIVE. If the thread has terminated and the function succeeds, the status returned is one of the following values: The exit value specified in the ExitThread or TerminateThread function. The return value from the thread function. The exit value of the thread's process. Important The GetExitCodeThread function returns a valid error code defined by the application only after the thread terminates. Therefore, an application should not use STILL_ACTIVE (259) as an error code. If a thread returns STILL_ACTIVE (259) as an error code, applications that test for this value could interpret it to mean that the thread is still running and continue to test for the completion of the thread after the thread has terminated, which could put the application into an infinite loop.

So basically it's still checking current thread from time to time.

It seems to be a bug:

http://connect.microsoft.com/VisualStudio/feedback/details/812144/vs2013-reports-incorrect-thread-exit-code

这篇关于为什么我看到多个&QUOT;螺纹0x22c8已退出与code 259(0x103)QUOT。信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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