Stackless python?!?

zappara

Mod Designer
Joined
Dec 19, 2003
Messages
2,781
Location
Finland
I was searching the net for some python information and came across Stackless python.

Here's short description about it:

Stackless Python is an enhanced version of the Python programming language. It allows programmers to reap the benefits of thread-based programming without the performance and complexity problems associated with conventional threads. The microthreads that Stackless adds to Python are a cheap and lightweight convenience which can if used properly, give the following benefits:

* Improved program structure.
* More readable code.
* Increased programmer productivity.

Would this be something that can be used in Civ 4? For example convert the game UI to use those so called 'tasklets' to improve the game's overal performance? I'm not that familiar with python coding so I'll let you guru's figure this out and perhaps give some answers? :)

Apparently Eve Online uses Stackless python in some way and they've had 60k players online at the same time so I'm pretty sure this Stackless system works also in multiplayer environment...

"When embarking on the creation of EVE Online, a single shared persistent world we realized two things: We could not given constraints of time and commercial reality do this in a compiled language and we needed innovative concurrency control for such a large scale shared state simulation across tens of thousands of CPUs (EVE Clients included). After many experiments with various combination of existing scripting languages and NT fibers we arrived at Stackless Python. Stackless Python offered us the power of Python coupled with a vastly superior concurrency control mechanism over anything we had seen before, first as continuations and later with an innovative channel based API.
 
Without looking at the website (problems loading it):
Seems to be interesting, but the problem is, that the Civ4 python interpreter is included in the .exe, and an enhanced version of python means sure an enhanced interpreteter -> as long as we can't recompile the .exe, it's probably not possible to integrate it.
 
Top Bottom