-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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

Hi,

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 ?

Sure.


Thanks a lot
vo minh thu


_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iEYEARECAAYFAkWhPcEACgkQJJNoeGe+5O4LHQCfReiLsMbuzBUSlaGzK7uJWbET
c1cAoIKLmhtt3Dv1H4DCs7cqhuJoPmgh
=JKBC
-----END PGP SIGNATURE-----


_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to