[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-dev] concurrent conditions
I don't really like this.
There can be multiple different conditions that might be waited on at
different times in a thread.
There is not just one way to use conditions. This method assumes that
though.
On Jan 28, 2004, at 4:47 PM, Julian Rohrhuber wrote:
schedSync { arg func;
syncTasks = syncTasks.add(func);
if(syncThread.isNil) {
syncThread = Routine.run {
var c; c = Condition.new;
while { syncTasks.notEmpty } { syncTasks.removeAt(0).value(c) };
syncThread = nil;
};
};
}
--
--- james mccartney james@xxxxxxxxxxxxxx <http://www.audiosynth.com>
SuperCollider - a real time audio synthesis programming language