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

Re: [sc-users] routine buildup



James McCartney wrote:


r.stop // return nil the next time someone calls .next
r.reset // actually on second thought, start over from the beginning the next time someone calls .next. (this contradicts the previous call)
r.play // also while you're at it, put yourself on the scheduler again.

Thus the result is you get the same Routine on the scheduler 3 times.

This explanation, of course, exactly describes how routine and task behaved in my example. For precisely this reason, I would like to propose that it is put in the help files of both routine and task together with my short example. Then the start-stop behavior of routine and task will be crystal clear for all who use them for the first time(s).

One might add, that even if I have the same routine in the scheduler three times, all three still respond to one r.stop, if one waits long enough for all the instances of the routine to come to a halt (i.e. to have returned nil), that is.

LF