Programming with Stackless Python

IN THE HEAP

Article from Issue 81/2007
Author(s):

The Stackless extension brings lightweight processes to Python, opening a new style of programming with dynamic heap access.

Stackless Python by Christian Tismer extends the popular Python interpreter, adding elements that facilitate the development of scalable applications. Small, independent program sections are encapsulated in tasklets. These tasklets use channels to communicate in an approach reminiscent of the Erlang and Oz languages. The name Stackless refers to the encapsulated functions that tasklets allow to be swapped out from stack to heap (dynamic) memory. Data stored at this location can be accessed at any time, regardless of the order in which it arrived. Figure 1 shows how this approach can save memory, especially with parallel functions.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Python Tricks

    Save time and trouble with these expert techniques for building custom Python tools.

  • Python 3

    What do Python 2.x programmers need to know about Python 3?

  • Social Skills

    Creating a custom application that toots text to Mastodon (the Fediverse's version of Twitter) is simple and straightforward. But we can mix it up by adding images and video, scheduling posts, and changing privacy settings.

  • Beyond FUDCon: Faces, Features and Future of Fedora

    The North American Fedora User and Developer Conference (FUDCon) was held on Arizona State University campus in Tempe Arizona from January 29 -31, 2011 and proved to be the largest FUDCon to date with over 200 people pre-registered to attend and final attendance numbers estimated around 175 people.

  • Automated Irrigation

    An automated watering system comprising a Raspberry Pi Zero W, an analog-to-digital converter, and an inexpensive irrigation kit can help keep your potted plants from dying of thirst.

comments powered by Disqus

Direct Download

Read full article as PDF:

Stackless_Python.pdf  (208.92 kB)

News