On Tue, 5 Feb 2008, Graham Fawcett wrote:

On Feb 5, 2008 12:30 PM, Elf <[EMAIL PROTECTED]> wrote:


im pretty sure you need mutexes.  its pretty easy though...


Are you saying this because you know (critical-section) behaviour is no
longer available in the Chicken runtime?

yes, im aware of it, and yes, this is how ive coped with it.


Note that (critical-section) is not a mutex-synchronizing form: it suspends
timer interrupts until the body is evaluated (i.e. you are guaranteed that
no other threads are executing during the evaluation of the body).

see above.  since the disable-timer-interrupts declares arent there anymore,
ive faked it with mutex sections.




(define-macro (protect-section ml . body)

[snip]



I'd recommend using the excellent (synch) egg rather than writing a custom
mutex-handler.

eh, its a very small number of lines and it doesnt have dependencies.

-elf



Best,
Graham



_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to