Cog end
EMHmark7
Posts: 93
Hi,
I do not find in the doc:
Q1) When code assigned to a cog ends, is the cog ended and released (erased)?
Good example for cog use:
Here I need to run a separate cog because the calling cog loop is the one that needs to continue reading incoming requests for Stop requests,
so it cannot wait for the end of the actual task for that
otherwise, impossible to stop that process if we wait for the end of the process in order to know if we want to end the process.
So, every time I start that process, I start it in a separate cog, because the show must go on in the calling cog.
That raises the Q1) about how to manage recurring starts and stops of a procedure in a separate cog.
I do not find in the doc:
Q1) When code assigned to a cog ends, is the cog ended and released (erased)?
Good example for cog use:
Here I need to run a separate cog because the calling cog loop is the one that needs to continue reading incoming requests for Stop requests,
so it cannot wait for the end of the actual task for that
otherwise, impossible to stop that process if we wait for the end of the process in order to know if we want to end the process.
So, every time I start that process, I start it in a separate cog, because the show must go on in the calling cog.
That raises the Q1) about how to manage recurring starts and stops of a procedure in a separate cog.
Comments
Without the cogstop it produces
With the cogstop it produces
So I catch that we can do it from within the running code, and it can know its own cogID with cogid().
Thanks again,
Marc