[IronPython] Suspending, saving script execution?

Curt Hagenlocher curt at hagenlocher.org
Sun Jan 28 18:36:55 CET 2007


On 1/28/07, Erzengel des Lichtes <erzengel-von-licht at cox.net> wrote:
>
> Now, the script is going to need to be suspended while it's moving 5
> meters
> (it's not going to teleport) forward, then again while it's turning 90
> degrees to the right, possibly again when it turns around, and finally
> once
> again while moving forward 2 meters.
> I can't block the script without suspending the thread/fiber, right? But
> with a large number of scriptable units, the system will not be able to
> cope
> with a thread/fiber per script.


This sounds like the sort of thing that Stackless Python[1] was invented
for.  This is a variation of CPython that -- by removing the dependency of
Python code execution on the processor's stack -- allows execution of
multiple objects without creating multiple threads.  The game "EVE Online"
uses Stackless Python for this purpose.

I doubt you could accomplish something similar in IronPython simply because
of how the CLR works.  But the low-level hooks in CLR 2.0 that were created
for SQL Server may allow something in that direction.

1: http://www.stackless.com
2: http://www.eve-online.com

--
Curt Hagenlocher
curt at hagenlocher.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20070128/297a1760/attachment.html>


More information about the Ironpython-users mailing list