[MLton] filedes = int (was: Stack size?)
Mon, 11 Jul 2005 15:00:52 -0700
> I would probably just use nanosleep() for both. There isn't much in the docs
> to say that Posix.Process.sleep is the sleep() system call.
The basis docs say that
The structure Posix.Process describes the primitive POSIX operations
dealing with processes, as described in Section 3 of the POSIX
That makes it pretty clear that Posix.Process.sleep should call
> In fact, if you look at the libc code, for the sleep call it uses
Fine, but presumably there is some other computation going on. Why
should we mimic that C code in ML when we can just call sleep? Also,
sleep's C implementation varies across platforms. Why should we try
to re-implement it?
> The only thing that makes me slightly (but only VERY slightly)
> nervous, is the basis doc which says that sleep suspends until
> either t seconds (note, SECONDS) have elapsed. Still, I say
> nanosleep() for both.
It still seems to me that calling sleep is more likely to correspond
with user expectations. And having both around (with nanosleep via
OS.Process.sleep) means there is nothing lost.