[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] SystemClock-schedAbs explodes when time arg not used?
On 9/22/05, Charlls Quarra <charlls_quarra@xxxxxxxxxxxx> wrote:
> I sure know that, what i think is rather odd is that
> n.do{} starts at 0 and jumps to n-1, n-2.... . I
> thought this was doing 0, 1, 2, ... n-2, n-1
The way you have your loop written, there is no guarantee that the
scheduled functions will execute in order. The reason is that you're
scheduling them for exactly the same time.
3.do { thisThread.seconds.postln }
264300.536847
264300.536847
264300.536847
When you schedule multiple things for the same timestamp, you don't
have any control over the order in which those things are retrieved
from the scheduler queue.
The do loop is running in order. The scheduler is doing what it can
with the information it has (which is limited because the timestamps
are the same).
hjh
--
James Harkins /// dewdrop world
jamshark70@xxxxxxxxxxxxxxxxx
http://www.dewdrop-world.net
"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal." -- Whitman