zhonghua
路人甲
路人甲
  • 注册日期2005-04-01
  • 发帖数94
  • QQ
  • 铜币466枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:2609回复:0

[求助]”非泵式等待“问题求助?

楼主#
更多 发布于:2006-12-30 16:54
<P ><FONT face="Times New Roman">错误如下:</FONT></P>
<P ><FONT face="Times New Roman">CLR </FONT>无法从<FONT face="Times New Roman"> COM </FONT>上下文<FONT face="Times New Roman"> 0x1b0dc8 </FONT>转换为<FONT face="Times New Roman"> COM </FONT>上下文<FONT face="Times New Roman"> 0x1b<st1:chmetcnv w:st="on" UnitName="F" SourceValue="0" HasSpace="False" Negative="False" NumberType="1" TCSC="0">0f</st1:chmetcnv>38</FONT>,这种状态已持续<FONT face="Times New Roman"> 60 </FONT>秒。拥有目标上下文<FONT face="Times New Roman">/</FONT>单元的线程很有可能执行的是非泵式等待或者在不发送<FONT face="Times New Roman"> Windows </FONT>消息的情况下处理一个运行时间非常长的操作。这种情况通常会影响到性能,甚至可能导致应用程序不响应或者使用的内存随时间不断累积。要避免此问题,所有单线程单元<FONT face="Times New Roman">(STA)</FONT>线程都应使用泵式等待基元<FONT face="Times New Roman">(</FONT>如<FONT face="Times New Roman"> CoWaitForMultipleHandles)</FONT>,并在运行时间很长的操作过程中定期发送消息。</P>
<P >是不是要多线程,哪位大虾能具体指点一下解决思路!不胜感激!</P>
喜欢0 评分0
游客

返回顶部