|Re: [AD] proposal: al_sleep()|
[ Thread Index |
| More lists.liballeg.org/allegro-developers Archives
On Fri, 2004-01-02 at 10:35, Stepan Roh wrote:
> > So my patch always improves things.
> It's not improvment, it's replacing it with another function. al_sleep()
> is good idea, but destroying yield_timeslice() is not.
Yes, I know. That's why I wanted to make al_sleep, before reading the
source. But on all platforms except windows and linux yield_timeslice
already works against the docs. And, even worse, they sleep much longer
than the minimum time specified to the relevant sleep functions (e.g.
snooze (30000) for BeOS). So I'm afraid now, if I make an al_sleep,
al_sleep(1) will for as I want for windows and linux, but maybe not in
other OSes, where I needa higher minimum sleep time. In the end, to do
what I want would again require #ifdefs, and so there'd be no point at
all writing the al_sleep.
A solution I'm more tending to now, in case we want to keep the current
behavior of yield_timeslice for Windows and Linux, would be a function
release_cpu. It would do the same as yield_timeslice everywhere except
windows and linux, and there it would do the same as my patch.
Elias Pschernig <elias@xxxxxxxxxx>