[CM] switch between processes

Achim Bornhoeft achim.bornhoeft at googlemail.com
Mon Apr 6 00:47:50 PDT 2009


Thanks for your suggestions.
The second one seems to be very straightforward, since running this in  
a wrapping process, the variables could be controlled easily in time.
Achim

Am 06.04.2009 um 00:08 schrieb Heinrich Taube:

> rather than coroutines, one "simple" way would be - to have each  
> process run for a section, then at the end of the sections to spout  
> a new version of itself in the future eg
> (define (me ...)
> (process  do
>                  ...
>                 finally (spout (me ...) 100)))
>
> another way: you could spout two processes that can both see the  
> same variable that they examine and set in order to control each  
> other.
>
>
> (let ((run1flag #t)
>       (run2flag #t))
>  (sprout (process when run1flag (output ....) (setf run1flag ???  
> run2flag ???)))
>  (sprout (process when run2flag (output ....) (setf run2flag ???  
> fund1flag ???))))
>
>
>
>
>
> On Apr 5, 2009, at 1:01 PM, Achim Bornhoeft wrote:
>
>> Hi,
>> what is the easiest approach to switch between two running processes
>> (CM2)?
>> e.g. start two prozesses at the same time, output only process 1,  
>> then
>> switch to process 2, output only process 2 while process 1 is still
>> running, switch back to process 1, output only process 1 while  
>> process
>> 2 ist still running, etc.
>>
>> process 1: ________ _ _ _ _ _ _ _ ________________
>>                  |             |
>> 		   |             |
>> process 2: _ _ _ _ _______________ _ _ _ _ _ _ _ _
>>
>> Thanks for any help.
>> Achim
>>
>> _______________________________________________
>> Cmdist mailing list
>> Cmdist at ccrma.stanford.edu
>> http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist





More information about the Cmdist mailing list