<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Just as a note:<br>
      <br>
      the PyPy stackless module was not really maintained in years, and
      I<br>
      remember I had a more compliant version prepared, but lost
      interest<br>
      after the Jit became unsuitable for the stackless version.<br>
      <br>
      Now it's time to finalize and correct this, because a Jit-enabled<br>
      stackless is in reach, again.<br>
      <br>
      Will try to get to it, soon.<br>
      <br>
      cheers - Chris<br>
      <br>
      On 7/5/12 8:42 PM, Hervé Coatanhay wrote:<br>
    </div>
    <blockquote
cite="mid:CAPq7H1ZBWxOaHM-fWx37Mv1LfR-7LYdAa2ch14vNBBWjQn5AcA@mail.gmail.com"
      type="cite">Hi all,
      <div><br>
      </div>
      <div>I was playing with stackless.py from pypy. In that
        implementation kill() definitely raises an exception:</div>
      <div><br>
      </div>
      <div><a moz-do-not-send="true"
href="https://bitbucket.org/pypy/pypy/src/68e7e825d598/lib_pypy/stackless.py#cl-68">https://bitbucket.org/pypy/pypy/src/68e7e825d598/lib_pypy/stackless.py#cl-68</a></div>
      <div><br>
      </div>
      <div>Just so you know.</div>
      <div><br>
      </div>
      <div>Hervé<br>
        <div class="gmail_quote">On Fri, May 25, 2012 at 5:11 AM,
          Richard Tew <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:richard.m.tew@gmail.com" target="_blank">richard.m.tew@gmail.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div class="im">On Sun, May 20, 2012 at 10:29 AM, Sylvain
              Prat <<a moz-do-not-send="true"
                href="mailto:sylvain.prat@gmail.com">sylvain.prat@gmail.com</a>>
              wrote:<br>
            </div>
            <div class="im">> I tried to wrap my tasklet in a parent
              object which has the same<br>
              > lifespan as my tasklet and has a __del__ function for
              cleaning up, but<br>
              > I keep having problems with circular references (the
              wrapper/parent<br>
              > object also provides the callable of the tasklet,
              i.e. a bound method)<br>
              > that make the tasklet/parent object uncollectable
              (circular references<br>
              > : wrapper --> tasklet --> stackless machinery?
              --> callable stack<br>
              > frame (bound method of wrapper) --> wrapper). Same
              problem when trying<br>
              > to inherit from tasklet.<br>
              ><br>
              > So, how can I clean up resources in tasklets? (I'm
              pretty sure I've<br>
              > missed something obvious)<br>
              <br>
            </div>
            Hi Sylvain,<br>
            <br>
            Kristjan having clarified that TaskletExit is definitely off
            the table<br>
            for now, I'd like to make the response I should have when
            you first<br>
            posted.  Fix your circular references and __del__ should be
            fine.<br>
            <br>
            What I tend to do is use weak references, where applicable,
            in order<br>
            to ensure that nothing keeps a tasklet alive except where I
            explicitly<br>
            want.  There is nothing internal to Stackless which will
            keep a<br>
            tasklet alive without your implicit direction.  If my
            tasklets are<br>
            kept alive and I detect it, then I use
            gc.get_referrers(tasklet) to<br>
            track down why.<br>
            <br>
            Cheers,<br>
            Richard.<br>
            <div class="HOEnZb">
              <div class="h5"><br>
                _______________________________________________<br>
                Stackless mailing list<br>
                <a moz-do-not-send="true"
                  href="mailto:Stackless@stackless.com">Stackless@stackless.com</a><br>
                <a moz-do-not-send="true"
                  href="http://www.stackless.com/mailman/listinfo/stackless"
                  target="_blank">http://www.stackless.com/mailman/listinfo/stackless</a><br>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Stackless mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Stackless@stackless.com">Stackless@stackless.com</a>
<a class="moz-txt-link-freetext" href="http://www.stackless.com/mailman/listinfo/stackless">http://www.stackless.com/mailman/listinfo/stackless</a></pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Christian Tismer             :^)   <a class="moz-txt-link-rfc2396E" href="mailto:tismer@stackless.com"><mailto:tismer@stackless.com></a>
tismerysoft GmbH             :     Have a break! Take a ride on Python's
Karl-Liebknecht-Str. 121     :    *Starship* <a class="moz-txt-link-freetext" href="http://starship.python.net/">http://starship.python.net/</a>
14482 Potsdam                :     PGP key -> <a class="moz-txt-link-freetext" href="http://pgp.uni-mainz.de">http://pgp.uni-mainz.de</a>
work +49 173 24 18 776  mobile +49 173 24 18 776  fax n.a.
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
      whom do you want to sponsor today?   <a class="moz-txt-link-freetext" href="http://www.stackless.com/">http://www.stackless.com/</a></pre>
  </body>
</html>