> This seems to even stop (proc) from being sprouted!
> I can't use id's because it would be too much of a trouble naming
> and keeping track of all the
when you call
(begin (stop)
(sprout …))
these function are not synchronies in the way you are expecting. scheme and the
scheduler are not the same thread. these scheme functions add "execution
nodes" to the scheduler thread from the scheme thread. the scheduler places
stop nodes at the head of its queue and they flush the queue or specific
nodes in the queue *when they are evaluated by the scheduler*. so the first
call adds a stop node, the second call added process node(s), then when the
scheduler wakes up it stop what you just added.
i think to approximate what you want either (1) Type Command-K and then
evaluate the expression. (2) evaluate (stop) and then evaluate (sprout), or
(3) keep them together as you have but have the stop selectively stop only the
process that you already sprouted in the previous pass (by associating ids with
them)
On May 21, 2013, at 2:18 AM, Antoine <[email protected]> wrote:
> Hello,
>
> I would like to stop all running processes and then sprout the next ones
> on a single evaluation.
>
> (define (proc)
> (process repeat 100 do
> (print (pick 1 2))
> (wait .5)
> ))
>
> (begin
> (stop)
> (sprout (proc))
> )
>
> This seems to even stop (proc) from being sprouted!
> I can't use id's because it would be too much of a trouble naming
> and keeping track of all the
> processes I am sprouting each time... I just would like to "flush"
> and keep on.
>
> Thank you for your time and your reply!
>
> Antoine
>
> _______________________________________________
> Cmdist mailing list
> [email protected]
> http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist
_______________________________________________
Cmdist mailing list
[email protected]
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist