<div>You are right, thank you. <span style="line-height: 1.5;">I have send a new patch now.</span></div><div><br></div><div><sign signid="0"><div style="color:#909090;font-family:Arial Narrow;font-size:12px"><br><br><br><br>------------------</div><div style="font-size:14px;font-family:Verdana;color:#000;"><div>Regards,</div><div>Changhui Liu</div>
</div></sign></div><div><qzone></qzone></div><div> </div><div><includetail><div> </div><div> </div><div style="font:Verdana normal 14px;color:#000;"><div style="FONT-SIZE: 12px;FONT-FAMILY: Arial Narrow;padding:2px 0 2px 0;">------------------ Original ------------------</div><div style="FONT-SIZE: 12px;background:#efefef;padding:8px;"><div id="menu_sender"><b>From: </b> "Aric Stewart"<aric@codeweavers.com>;</div><div><b>Date: </b> Mon, Dec 28, 2015 11:55 PM</div><div><b>To: </b> "wine-devel"<wine-devel@winehq.org>; "liuchanghui"<liuchanghui@linuxdeepin.com>; <wbr></div><div></div><div><b>Subject: </b> Re: hidclass.sys: Properly quit hid_device_thread when bothcompletion event and halt event are signaled.</div></div><div> </div>Sorry for the delayed review, I have been traveling.<br><br>I understand the issue your trying to fix, but I worry that you could get yourself into a bad state where if a driver is misbehaving and is blocked or crashes while processing an IRP then the halt event will never get processed as we will be waiting INFINITE on an event that may never come. <br><br>I dont know which is the more likely or problematic case. <br><br>What I may suggest is keep the WaitForMultipleObjects(2, events, FALSE, INFINITE) and instead of relying on the return code you could do an additional <br>WaitForSingleObject(ext->halt_event, 0) to determine if exit_now should be set. <br><br>-aric<br><br></div><!--<![endif]--></includetail></div>