[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] hacking the mailbox egg

From: Kon Lovett
Subject: Re: [Chicken-users] hacking the mailbox egg
Date: Sun, 7 Jan 2007 10:36:49 -0800

Hash: SHA1

On Jan 7, 2007, at 10:14 AM, minh thu wrote:


I'd like to write a small library along the lines of the mailbox egg.
The goal is to have a queue where the elements are ordered by some
kind of value attached to them (in my case, it will be the moment when
the element has to be extracted from the queue).

So essentially a priority queue.

Reading the code, and being fairly new to scheme and chicken, I have
some questions:

- why is there a queue.scm file ? Is it because usage of the extras
unit can be disabled ?

No. Because the extras unit doesn't disable interrupts. Mailbox doesn't synchronize access to its globals explicitly but disables interrupts, so the entire file is a critical-section.

- what are those ##sys#xxx and ##core#xxx functions ?
is it permitted (good style) to use them ? where are they documented ?

Permitted, yes.

Good style? Well, I wouldn't use them unless necessary, or unless hacking in someone else's code that does use them. You may notice that 'queue.scm' defines wrappers around the '##sys' access routines so the main body of the code calls very few directly. And some operations are just not available outside of the sys namespace, in which case they must be used.

Documented, no.

When/if I complete the writing of such a library, would it be good to
add it to Eggs Unlimited ?
Have you an idea for its name ? ordered-mailbox ?


Thanks a lot
vo minh thu

Chicken-users mailing list

Version: GnuPG v1.4.5 (Darwin)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]