c# - What could cause EventWaitHandle.Set() to block the current thread? -


i invoking set method on instance of manualresetevent, , deadlocking. can't find in documentation indicate blocking method. cause mre.set block?

stack trace:

[managed native transition] mscorlib.dll!system.threading.eventwaithandle.set() + 0xe bytes mycode.stopall(bool force) line 179 + 0xd bytes mycode.calccheckthread() line 250 + 0xb bytes mscorlib.dll!system.threading.threadhelper.threadstart_context(object state) + 0x66 bytes mscorlib.dll!system.threading.executioncontext.run(system.threading.executioncontext executioncontext, system.threading.contextcallback callback, object state) + 0x6f bytes mscorlib.dll!system.threading.threadhelper.threadstart() + 0x44 bytes    private static void stopall(bool force) {     if( !force )         loghelper.sendallclosestate(logger);      _forcablyexit = force;     _running = false;     _stopwait.set();  // line appears blocking } 

we've tracked down source of problem of our friends @ microsoft developer support.

eventwaithandle.set() enters critical block section, , can blocked if native code enters critical block , never releases it. happening old 3rd-party library using, , can't replaced/updated.


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -