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

Re: [sc-dev] SystemClock bug?




On Tuesday, December 30, 2003, at 07:55 AM, James Harkins wrote:

I have found repeatedly that scheduling too many
events to fire too quickly reliably causes the
language to crash. I don't believe it has to do with a
scheduling size restriction, but rather with the
number of functions that are executing simultaneously.
You can get the same crash by scheduling complex
functions so quickly that the execution overlaps by a
high amount.

execution never overlaps at all because for
any byte code to be executed the global interpreter
lock needs to be held.

the main problems i've noticed are that because
the scheduling threads are high priority threads
they tend to starve out the others if they have
a big work load + they play catch up if they miss stuff.

maybe there should be some kind of safety mechanism in place.

If a function takes 0.1 seconds to return
its result and you schedule the function to execute
200 times with 0.001 seconds between onsets, down she
goes.

I don't see it as a bug, just a reasonable limitation.

This kind of scheduling could probably be made "safer"
but that might have a negative impact on performance
overall.

H. James

--- nikolai collinsky <nikolaicollinsky@xxxxxxxxxxx>
wrote:
//this crashes SC3-


100.do({SystemClock.sched(4.0.rand,{1.0.rand.postln;})})

scheduling queue size restriction?

(can get round by converting absolute scheduling to
delta time scheduling to use less clocks but still,
would be nice to have safe scheduling
possibilities...)


=====
____   James Harkins /// dewdrop world
\  /   jamshark70@xxxxxxxxx
 \/    http://www.duke.edu/~jharkins

"... love and hot pants, peace, harmony..."
  -- Dick Lee, Hot Pants: The Musical

__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
_______________________________________________
sc-dev mailing list
sc-dev@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-dev