Hi,
> When I added a timeout weird things started happening so I made a
> self-contained test case:
I notice that my code is almost identical to that in the wiki under the
documentation for thread-yield!:
-----
; a busy loop that avoids being too wasteful of the CPU
(let loop ()
(if (mutex-lock! m 0) ; try to lock m but don't block
(begin
(display "locked mutex m")
(mutex-unlock! m))
(begin
(do-something-else)
(thread-yield!) ; relinquish rest of quantum
(loop))))
-----
Trying my self-contained test case above with an additional
thread-yield! in the unsuccessful branch and timeouts of 0 and 1 result
in the same problem of eventually being unable to lock the mutex.
Regards,
@ndy
--
[email protected]
http://www.ashurst.eu.org/
0x7EBA75FF
_______________________________________________
Chicken-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-users