[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Manual timeslicing the VM.
- From: David Morris-Oliveros <david@...>
- Date: Wed, 10 Aug 2005 15:44:41 +1000
Are coroutines closed? They're created through lua_newthread(), but not
closed with lua_close() right?
When you're finished with one, you just let it die and leave it alone,
dangling inside lua, right?
Mike Pall wrote:
Hi,
David Morris-Oliveros wrote:
It would be similar to the hooks in lua, but rather lua calling the hook
every 5 instructions, i let it execute those 5 instructions, then it
comes back to me.
That's inversion of control. Lua already supports that with the
help of coroutines. And lucky you, you can yield from a count hook
(or line hook).
[...snip...]
--
// David Morris-Oliveros
// Camera & Lua Coder
// Team Bondi
------------------------------------------------------------------------
Contact:
Team Bondi Pty Ltd
Level 2, 608 Harris Street
Ultimo, NSW 2007
Australia
Tel: +61 (0)2 8218 1500
Fax: +61 (0)2 8218 1507
Web: http://www.teambondi.com
------------------------------------------------------------------------
This email may contain confidential information. If you are not
the intended recipient, you may not copy or deliver this message to
anyone. In such case, you should destroy this message and kindly
notify the sender by reply email. Opinions, conclusions and other
information in this message that do not relate to the official business
of our firm shall be understood as neither given nor endorsed by it.
------------------------------------------------------------------------