[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: pcall() and coroutine.yield()
- From: Mark Hamburg <mhamburg@...>
- Date: Mon, 18 Oct 2004 19:33:18 -0700
on 10/18/04 7:18 PM, Mike Pall at mikelu-0410@mike.de wrote:
> The coroutine-on-top-of-coroutine solution demonstrated by Roberto may be
> ok for some cases. But it is definitely not feasible for my code due to
> the high overhead of creating and destroying millions of ultra-short
> running coroutines per second. This is not just a lightweight function call
> after all. :-(
One might be able to keep a stack of coroutines and recycle them. I do that
in some of my code but I haven't studied Roberto's code closely to see how
that would fit. Recycling basically depends on having the coroutine come
back around to a point where it waits for a new routine to execute.
Mark