4 ms·
I've read the Wikipedia article on Stackless Python but I was wondering if someone could quickly explain why Stackless is more desirable to CCP than regular Pyt
by look_lookatme 13y ago
I've read the Wikipedia article on Stackless Python but I was wondering if someone could quickly explain why Stackless is more desirable to CCP than regular Python?
- gvickers 13y agoLets you get around the GIL (Global Interpreter Lock), basically gives python lightweight threads (greenlets).
- deleted 13y ago[deleted]
- sp332 13y agoUnlike most MMOs, which have multiple instances or "shards" of each location, EVE Online keeps all players in one shard. That means, for busy hub areas, they have to handle thousands of ships interacting with each other all on one server. The lightweight concurrency lets them write little (and not-so-little) bits of code that execute in parallel without incurring overhead associated with OS threads. Edit: sorry if I'm confusing "concurrent" and "parallel", I never really liked those terms :p
- cdash 13y agoAs far as I know nothing in EVE executes in parallel in a traditional sense. Each solar system is run on one thread and one python interpreter. While stackless is used for concurrent programming it is not used for parallel programing.
- krisvale 13y agoThousands of lightweight threads with cooperative scheduling. Allows you to have a myriad of little programs running, each perhaps servicing a network request, or running some long running game logic. Impossible with threads. Also, threads are pre-emptive, which means that you need to use locking almost everywhere.