<div dir="ltr">There is. Gambit just detected for you that the condition you got into will guaranteedly never fix and therefore it told you it's a deadlock.</div><div class="gmail_extra"><br><br><div class="gmail_quote">

2014-06-11 6:13 GMT+02:00 Vijay Mathew <span dir="ltr"><<a href="mailto:vijay.the.lisper@gmail.com" target="_blank">vijay.the.lisper@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">Why is the following error happening in the REPL?<div><br></div><div><div>> (define c (make-condition-variable))</div><div>> (define m (make-mutex))</div><div>> (mutex-unlock! m c)</div><div>*** ERROR IN ##thread-deadlock-action! -- Deadlock detected</div>


</div><div><br></div><div>If I do call mutex-unlock! from a thread, it does not raise this error:</div><div><br></div><div><div>> (thread-start! (make-thread (lambda () (mutex-unlock! m c) (println "ok"))))</div>


<div>#<thread #2></div><div>1> (condition-variable-broadcast! c)</div><div>=> ok</div></div><div><br></div><div>Is there a way to invoke mutex-unlock! from the top-level without raising the deadlock error?</div>


<div><br></div><div>Thanks,</div><div><br></div><div>--Vijay</div></div>
<br>_______________________________________________<br>
Gambit-list mailing list<br>
<a href="mailto:Gambit-list@iro.umontreal.ca">Gambit-list@iro.umontreal.ca</a><br>
<a href="https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list" target="_blank">https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list</a><br>
<br></blockquote></div><br></div>