[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] Event Timing Offset



On 1/4/06, Jeremy Zuckerman <jz@xxxxxxxxxxxxxxx> wrote:
> so in your example, since {mySlider.value} is using the AppClock the
> timing is asynchronous and thus unpredictable?

"Asynchronous" doesn't necessarily mean unpredictable. It just means
that the operation will complete sometime later and that the thread
making the async call won't wait for the return value.

Since it's impossible for one thread (AppClock in my example) to
interrupt another (the routine) -- the currently running thread must
either stop or yield before another thread can wake up -- {
mySlider.value } gets scheduled on AppClock now but doesn't run until
the routine yields. But, you need the return value from mySlider.value
to know what to yield. Catch-22... which, to tie into another thread,
is why you should use guis to change the state of a model (even if the
model is only a variable) rather than using guis as value registers :)

It's precisely analogous to waiting for the server response to
c_get... you need the value NOW but you won't get it (the OSCresponder
can't fire) until your routine yields.

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