This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: usleep defintion in coop.c






>Okay, this should be fixed in tomorrow's snapshot.
>
>Guile no longer tries to supplant the system's definitions for sleep
>and usleep.  That was very unclean, it seems to me.
>
>The cost is that other packages linked with Guile will not "magically"
>get thread-friendly versions of usleep and sleep, but I think that's a
>misfeature anyway.  If the user wants this behavior, she can write a
>little library containing versions of sleep and usleep that just call
>scm_thread_sleep and scm_thread_usleep, and then put it in her link
>line where she wants it.  But Guile shouldn't do this kind of magic
>without asking.

I wouldn't automatically assume that you shouldn't do that magic. In the
move to threads there is often a lot
of debate about how old system calls should work in the context of threads.

How does sleep and usleep work in threaded versions of UNIX? We should
probably use that as a guide
since they have probably put a bit of thought into what the right semantics
 are.