Re: Howto use pause and resume with latest IO

petri rokka <[email protected]>
Newsgroups gmane.comp.lang.io
Message-ID <[email protected]>
Great that you found a fix :) . Can you post the fix here so i can try it
out. Should my posted test app work with it?

Btw. I am also having problem with pause. I need to pause/resume  the only
existing coro in application to pause it and continue it later (io is
embedded in my c++ app) , but its impossible because pause forces
application system exit at that point. :/

Could you make different pause that doesn't force the system exit?


2011/5/17 Jan-Paul Bultmann <[email protected]>

>
>
>
> On May 17, 2011, at 8:50 PM, Steve Dekorte wrote:
>
>
>
>
> On 2011-05-17 Tue, at 06:34 AM, Jan-Paul Bultmann wrote:
> > Why is a new coroutine generated anyways? And especially where? I would
> consider it unwanted behavior if you resume one Coroutine but your stuff
> will run in another.
>
> There are a few cases:
> 1) when you do a try() - exceptions handling is implemented with coros.
> 2) when a coro gets close to running out of stack space, it creates a new
> coro to continue executing in.
>
> Cool to know, thanks :)
>
>
> It's surprising this hasn't come up before, but your code exposes a bug in
> the current actor implementation. I'll add a bit of code to Coroutine to
> make sure resumes are sent to the proper child coroutine.
>
> - Steve
>
>
>  
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.