python-stackless

Why can't generators be pickled?

Why can't generators be pickled? Question: Python’s pickle (I’m talking standard Python 2.5/2.6/2.7 here) cannot pickle locks, file objects etc. It also cannot pickle generators and lambda expressions (or any other anonymous code), because the pickle really only stores name references. In case of locks and OS-dependent features, the reason why you cannot pickle them …

Total answers: 2

Python/Erlang: What's the difference between Twisted, Stackless, Greenlet, Eventlet, Coroutines? Are they similar to Erlang processes?

Python/Erlang: What's the difference between Twisted, Stackless, Greenlet, Eventlet, Coroutines? Are they similar to Erlang processes? Question: My incomplete understanding is that Twisted, Stackless, Greenlet, Eventlet, Coroutines all make use of async network IO and userland threads that are very lightweight and quick to switch. But I’m not sure what are the differences between them. …

Total answers: 3

Which Actor model library/framework for python and Erlang-like?

Which Actor model library/framework for python and Erlang-like? Question: I am looking for an easy-to-learn Actor library or framework for Python 2.x. I have tried Candygram and Twisted but I did not like them. I’d like something that will be easy to extend to suppero Greenlet (= stackless python). Candygram is too old. Twisted is …

Total answers: 6

Eventlet or gevent or Stackless + Twisted, Pylons, Django and SQL Alchemy

Eventlet or gevent or Stackless + Twisted, Pylons, Django and SQL Alchemy Question: We’re using Twisted extensively for apps requiring a great deal of asynchronous io. There are some cases where stuff is cpu bound instead and for that we spawn a pool of processes to do the work and have a system for managing …

Total answers: 4

What would I use Stackless Python for?

What would I use Stackless Python for? Question: There are many questions related to Stackless Python. But none answering this my question, I think (correct me if wrong – please!). There’s some buzz about it all the time so I curious to know. What would I use Stackless for? How is it better than CPython? …

Total answers: 6

Threading in Python

Threading in Python Question: What are the modules used to write multi-threaded applications in Python? I’m aware of the basic concurrency mechanisms provided by the language and also of Stackless Python, but what are their respective strengths and weaknesses? Asked By: Jon || Source Answers: It depends on what you’re trying to do, but I’m …

Total answers: 7

Python Global Interpreter Lock (GIL) workaround on multi-core systems using taskset on Linux?

Python Global Interpreter Lock (GIL) workaround on multi-core systems using taskset on Linux? Question: So I just finished watching this talk on the Python Global Interpreter Lock (GIL) http://blip.tv/file/2232410. The gist of it is that the GIL is a pretty good design for single core systems (Python essentially leaves the thread handling/scheduling up to the …

Total answers: 7

Python Comet Server

Python Comet Server Question: I am building a web application that has a real-time feed (similar to Facebook’s newsfeed) that I want to update via a long-polling mechanism. I understand that with Python, my choices are pretty much to either use Stackless (building from their Comet wsgi example) or Cometd + Twisted. Unfortunately there is …

Total answers: 7

What are the drawbacks of Stackless Python?

What are the drawbacks of Stackless Python? Question: I’ve been reading recently about Stackless Python and it seems to have many advantages compared with vanilla cPython. It has all those cool features like infinite recursion, microthreads, continuations, etc. and at the same time is faster than cPython (around 10%, if the Python wiki is to …

Total answers: 4