[Stackless] stacklesslib.async

Andrew Francis andrewfr_ice at yahoo.com
Tue Sep 3 18:18:26 CEST 2013


Hi Kristjan and Folks:

Message: 2
Date: Mon, 2 Sep 2013 10:23:51 +0000
From: Kristj?n Valur J?nsson <kristjan at ccpgames.com>
To: "The Stackless Python Mailing List (stackless at stackless.com)"
    <stackless at stackless.com>
Subject: [Stackless] stacklesslib.async
Message-ID:
    <EFE3877620384242A686D52278B7CCD3683F4177 at RKV-IT-EXCH104.ccp.ad.local>
Content-Type: text/plain; charset="iso-8859-1"

>Hi there.
>I just checked in an addition to the stacklesslib, the async module.
>See https://bitbucket.org/krisvale/stacklesslib
>This was inspired by the C#async feature, http://msdn.microsoft.com/en->us/library/vstudio/hh191443.aspx

>The module provides two things:
>1)      A Task class, which represents an execution unit, and functions to create tasks and decorators >to help create "task" functions.

I'm vaguely familiar with those C# calls. When I have time, I'll download your stacklesslib module. I'll also download a copy of C# (and maybe F#) so I can compare. That said, I think that functionality exists because 1) C# does not have lightweight threads 2) Microsoft has done extensive concurrency research (i.e, look at the paper "Cooperative Task Management without Manual Stack Management" and some of that knowledge is starting to get into their modules.

>Stackless has no continuations anymore, so fooAsync is actually run entirely as a new tasklet, but 

Have you thought about experimenting with PyPy's stackless.py module? I believe under the hood, it has single shot continuations. You get the additional bonus of JIT support.

Cheers,
Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stackless.com/pipermail/stackless/attachments/20130903/18f35509/attachment.html>


More information about the Stackless mailing list