Skip to content.

logo Stackless Python

Personal tools

About Stackless

An introduction for newcomers

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.


For all the convenience gained through using Stackless, there is really only a minimal amount of functionality exposed through the stackless module. You can get more familiar with these aspects by reading the information provided in the following pages:

  • Microthreads. Tasklets wrap functions allowing them to be launched as microthreads.
  • Channels. Channels can be used for bidirectional communication between tasklets.
  • Scheduling. A round robin scheduler is built in. It can be used to schedule tasklets either cooperatively or preemptively.
  • Serialisation. Tasklets can be serialised to disk through pickling for later resumption of execution.

Further reading material

  • FAQ: Frequently asked questions.
  • Examples: Useful or descriptive pieces of code that shows Stackless functionality in use.
  • Idioms: Common patterns in using Stackless Python in code.
  • Applications: Some of the businesses and projects that Stackless Python has been used by.

Getting started


You either need to compile your own copy from the source code in SVN, or alternatively if you use Microsoft Windows, obtain the provided precompiled binaries to install over those in your existing Python installation.

Learning to use Stackless

There are currently five main places that you can look to for information on how to use Stackless:

  1. The documentation.
  2. The tutorial "Introduction to Concurrent Programming with Stackless Python", written by Grant Olson. [mirror]
  3. The pages in the wiki on this web site.
  4. The mailing list archives.

Please feel free to email the mailing list with any questions you may have.


Powered by Plone