I have tried it now. I think it already works correct.
The output of a direct python run and one with rumprun seems to be the same 
(12,56,34).
A other project where I want to use it seems to work too.
Thank you Ryan for greenlet support it is very usefull and a big help for me :)

________________________________
Von: [email protected] 
<[email protected]> im Auftrag von Antti Kantee 
<[email protected]>
Gesendet: Mittwoch, 7. September 2016 14:44:41
An: [email protected]
Betreff: Re: Python and greenlets

On 05/09/16 19:53, Ryan Day wrote:
> Once the build is complete, greenlets is available as a builtin. The
> example in examples/ almost works. I think the final "78" line is not being
> printed even though it should be. This brings us to the discussion part,
> and why I moved to the list :)

Looking at the code:

=== snip ===
def test1():
     print(12)
     gr2.switch()
     print(34)

def test2():
     print(56)
     gr1.switch()
     print(78)


gr1 = greenlet(test1)
gr2 = greenlet(test2)

if __name__ == '__main__':
     hello_world()
     gr1.switch()
=== snip ===

Ignoring hello_world(), I'd expect that program to output:

12
56
34

What is it actually printing?

Reply via email to