[gambit-list] Deadlock in the REPL

Vijay Mathew vijay.the.lisper at gmail.com
Wed Jun 11 09:02:49 EDT 2014


Is it not possible for a background thread to eventually signal the
condition variable?

-- vijay
On Jun 11, 2014 4:55 PM, "Mikael" <mikael.rcv at gmail.com> wrote:

> 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.
>
>
> 2014-06-11 6:13 GMT+02:00 Vijay Mathew <vijay.the.lisper at gmail.com>:
>
>> Why is the following error happening in the REPL?
>>
>> > (define c (make-condition-variable))
>> > (define m (make-mutex))
>> > (mutex-unlock! m c)
>> *** ERROR IN ##thread-deadlock-action! -- Deadlock detected
>>
>> If I do call mutex-unlock! from a thread, it does not raise this error:
>>
>> > (thread-start! (make-thread (lambda () (mutex-unlock! m c) (println
>> "ok"))))
>> #<thread #2>
>> 1> (condition-variable-broadcast! c)
>> => ok
>>
>> Is there a way to invoke mutex-unlock! from the top-level without raising
>> the deadlock error?
>>
>> Thanks,
>>
>> --Vijay
>>
>> _______________________________________________
>> Gambit-list mailing list
>> Gambit-list at iro.umontreal.ca
>> https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20140611/5d203001/attachment.htm>


More information about the Gambit-list mailing list