Re: [AD] proposal: al_sleep() |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
And by now I still fail to see when the current
yield_timeslice in Windows/Linux is useful.
ok, lets say i have 2 programs running.
both use yield_timeslice(), they both would get 50% CPU each.... but
because they use yield_timeslice they get onto the CPU more often, then if
they had no yeilding.
so they get to poll the hardware more often and therefore a more reposnsive.
now, imagine we have 2 programs running.
appA uses yield_timeslice and appB uses your Sleep(1)
appA will get 99% CPU and appB will get 1% CPU
so appA is now extremely more responsive, and your appB using sleep(1) is
now got crap response.
i would prefer to have a situation like the 1st example, where both
yield, both get 50% cpu and both are mega responsive.
this applys to threads of the same app too; because you sleep a thread not
an app(process).
aj.