Stackless Python

July 7, 2008 § 1 Comment

After my previous research about Erlang, I thought to myself, how Python is stacking up against concurrent programming language?

The answer might be, sorry for the chessy pun above, Stackless Python.

Similar to Erlang’s green process, Stackless Python has microthreads called Tasklets.

Tasklets allows you to perform operations in multi-threading environments safely without the need of semaphores.

If what I understand is correct, the payload of each of this Tasklet is small. Therefore creating a whole bunch of them is not a huge penalty to system resources.

If there are resources need to be shared between Tasklets, use Channels.

In conclusion, Stackless Python gives the ability for developers to execute operations in a thread-safe manner, while still retain the familiar imperative syntax.

Side Note:

  • I’m very happy with Stackless Python wiki, they give really easy step-by-step tutorials.

References:

Advertisements

Tagged: , ,

§ One Response to Stackless Python

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

What’s this?

You are currently reading Stackless Python at RAPD.

meta

%d bloggers like this: