>
> The simplest way to do this would be to define the wrapping Python

function code in C as a string, and to compile it into a function

object that you can run as a tasklet.  An example Python function

follows, the C part I leave to you.


> e.g.


>  def RunFunctionAndGetResult(chan, func, *args, **kwargs):

     chan.send(func(*args, **kwargs))


That was precisely the suggestion I would have made, but I was not sure it
would be right. Gives me a bit more confidence when it comes to answering
future questions!

On Tue, Jun 22, 2010 at 11:16 PM, Richard Tew <[email protected]>wrote:

> On Tue, Jun 22, 2010 at 11:37 PM, Lin Luo <[email protected]> wrote:
> > the caller. But I have yet to see a way to retrieve the return value of
> the
> > bound callable running as a tasklet.
>
> I do not know that there is one.
>
> > important return value to be used later. It seems that writing such a
> > Micromanaging function on the C side is not very feasible, since I
> haven't
>
> The simplest way to do this would be to define the wrapping Python
> function code in C as a string, and to compile it into a function
> object that you can run as a tasklet.  An example Python function
> follows, the C part I leave to you.
>
> e.g.
>
>  def RunFunctionAndGetResult(chan, func, *args, **kwargs):
>      chan.send(func(*args, **kwargs))
>
> Cheers,
> Richard.
>
> _______________________________________________
> Stackless mailing list
> [email protected]
> http://www.stackless.com/mailman/listinfo/stackless
>
_______________________________________________
Stackless mailing list
[email protected]
http://www.stackless.com/mailman/listinfo/stackless

Reply via email to