<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hello,</div><div><br class="webkit-block-placeholder"></div>I am experiencing a strange bug in my code that would be long to explain. To resume the context, I have many threads running in parallel, some open-process IO, some tcp-server IO and some termite processes. At some point all the threads become blocked indefinitely and the program sleeps forever. <div><br class="webkit-block-placeholder"></div><div>I stumbled on  the following paragraph in the threads section of the Gambit doc:</div><div><br class="webkit-block-placeholder"></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Helvetica; "><font class="Apple-style-span" size="6"><span class="Apple-style-span" style="font-size: 19px;">``A thread is</span></font><span style="font: 12.0px Helvetica"><font class="Apple-style-span" size="6"><span class="Apple-style-span" style="font-size: 19px;"> </span></font></span><font class="Apple-style-span" size="6"><span class="Apple-style-span" style="font-size: 19px;">blocked</span></font><span style="font: 12.0px Helvetica"><font class="Apple-style-span" size="6"><span class="Apple-style-span" style="font-size: 19px;"> </span></font></span><font class="Apple-style-span" size="6"><span class="Apple-style-span" style="font-size: 19px;">if it is waiting for a mutex to</span></font><span style="font: 12.0px Helvetica"><font class="Apple-style-span" size="6"><span class="Apple-style-span" style="font-size: 19px;"> become unlocked, an I/O operation to become possible, the end of a “sleep” period, etc.</span></font><span style="font: 12.0px Helvetica"><font class="Apple-style-span" size="6"><span class="Apple-style-span" style="font-size: 19px;"> ''</span></font></span></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Helvetica; "><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px;"><br class="webkit-block-placeholder"></span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Helvetica; "><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px;"><br class="webkit-block-placeholder"></span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Helvetica; "><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px;">I think this may lead me to a solution to my bug but I don't clearly understand the statement. Could there be an IO operation that blocks all my threads?</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Helvetica; "><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px;">Any help would be greatly appreciated.</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Helvetica; "><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px;"><br class="webkit-block-placeholder"></span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Helvetica; "><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px;">Thank you,</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Helvetica; "><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px;">Francois Magnan</span></font></div></div><div><br class="webkit-block-placeholder"></div><div> </div></body></html>