Re: Re: Ramifications of Removing Coroutines or Implement at higher level than C
Jan-Paul Bultmann <[email protected]>
| Newsgroups | gmane.comp.lang.io |
|---|---|
| Message-ID | <[email protected]> |
I don't think that coroutines can be stripped. And even if it can be done, I don't know if it is smart. If you remove coroutines, you would also remove exceptions, and I really don't want to know what else in the system depends on them. I suspect that it's a TON.^^ But you could swap the underlying Coroutine implementation, as far as I know, coroutines as a concept should be implementation agnostic, you could implement them with register swapping, as it is currently done, or you could implement them with jumps, or continuations, hell even threads (though that would be slow, and you would have to create a global interpreter lock (hello python :D)). So, if you have problems with the coroutine implementation interfering with other parts of the system, I would choose another implementation. I think there are already several in the coroutine framework included. Sadly I don't know any C++ so I can't help you with that :) more specifically. Cheers Jan On Jun 18, 2011, at 5:06 AM, dennisf486 wrote: > Forgot to mention - a further example of the trouble that a low-level implementation of co-routines causes me is that it makes valgrind crash when I try to use it to analyze my program. Valgrind gives a warning about the client swapping stacks, and then segfaults. > I would rather fix a Program that segfaults, than one that works perfectly fine^^ > >