From: François PERRAD <[EMAIL PROTECTED]> Date: Mon, 23 Oct 2006 18:51:03 +0200
In languages/lua/lib/thread.pir, I create a Lua thread type by extension of Parrot::Coroutine. So I add a lot of methods for Lua type, but I think that 2 of these methods could be integrated in Parrot::Coroutine : - __clone - __get_pointer (equivalent of get_pointer() in src/pmc/sub.pmc) François. The thread.pir methods you mention are stubs, so I'm not certain what they should do. * Should __clone copy the whole object state, or just the initial sub, effectively resetting the coroutine to the start? Methinks the latter, but I have little practical experience with coroutines. * What should __get_pointer return? The address of the PMC? If so, would that be better to implement on default.pmc? In any case, I have had to limit my Parrot hacking lately to keep my hands from hurting [1], so feel free to enhance Parrot::Coroutine as you see fit. AFAIK, you're the only one using it at this point, so you shouldn't need to worry about breaking anything else. -- Bob [1] FWIW, it's not a big deal, and I'm trying hard to keep it that way.