<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi Kristjan,<br>
<br>
how about checking it into a branch firt, let us try and check
that<br>
intensively, and after enough confidence merge it in?<br>
That's the way that works best for me with Mercurial/Git.<br>
<br>
If you don't like to put a branch into python.org, you also can do
a clone<br>
on bitbucket easily and let us use that for review.<br>
<br>
cheers - chris<br>
<br>
On 28.11.12 16:11, Kristján Valur Jónsson wrote:<br>
</div>
<blockquote
cite="mid:EFE3877620384242A686D52278B7CCD329DED26D@RKV-IT-EXCH103.ccp.ad.local"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span lang="IS">Hello All.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="IS">I was recently prompted to
add a flag to stackless, a way to block all tasklet
switching.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="IS">This springs from the way
that we are embedding stackless python in an game engine
(UnReal) which sometimes makes callbacks into python.
Sometimes, this code will do nasty stuff that results in
tasks switching, causing havoc with the control flow of the
game engine.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="IS">To simplify this, I added a
per-thread flag, switch_trap, which can be controlled in a
similar way to block_trap. If the logic causes a switch to
be attempted, this should be trappable and the code should
be easily fixable, or we can otherwise deal with it.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="IS"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="IS">Anyway, doing this, adding
it to slp_schedule_task(), and so on, uncovered a subtle
flaw in stackless:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="IS">It turns out that
slp_schedule_task() had no way of differentiating whether an
exception result from this call came as a result of a
failure to switch, or an exception being sent to the tasklet
when it wakes up again.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="IS"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="IS">So, I have changed the
interface to be able to do this properly. There are other
reasons why switching can fail, including memory allocation
failures and so on, so this seems like a necessary change.
I also fixed code both in stacklesseval.c and taskletmodule
and channelobject to be able to cope with switch failure
like this.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="IS"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="IS">Now:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="IS">How does this sound to
you? The change is somewhat large and I would hesitate to
simply check it in without some sort of review or otherwise
approval. Any suggestions?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="IS"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="IS">K<o:p></o:p></span></p>
</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>
Software Consulting : 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>
phone +49 173 24 18 776 fax +49 (30) 700143-0023
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>