<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2657.73">
<TITLE>RE: [Pyrex] Pyrex and the GIL</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>&gt; That's not right either, because when calling</FONT>
<BR><FONT SIZE=2>&gt; out to such a function you need to ensure that</FONT>
<BR><FONT SIZE=2>&gt; the GIL is *not* held.</FONT>
</P>

<P><FONT SIZE=2>Assuming we are talking about a wrapper function which toggles the GIL state around the function/method that is decorated with whatever the keyword ends up being. What is the proposed behaviour? We have a number of different scenarios which can occur, enumerating these may help to indicate the direction that the naming of the keyword should pursue.</FONT></P>

<P><FONT SIZE=2>1) Function foo requires GIL to be acquired, Calling scope holds the GIL.</FONT>
</P>

<P><FONT SIZE=2>2) Function foo requires GIL to be acquired, Calling scope does not hold the GIL.</FONT>
</P>

<P><FONT SIZE=2>3) Function foo requires GIL to be released, Calling scope holds the GIL.</FONT>
</P>

<P><FONT SIZE=2>4) Function foo requires GIL to be released, Calling scope does not hold the GIL.</FONT>
</P>

<P><FONT SIZE=2>Do we base the behaviour on a combination of the calling scope and the function requirements? E.g. when the calling scope holds the GIL and the function requires the GIL to be acquired we don't release the GIL at the end of the function. Extending this type of behaviour would make the semantics of 'ensure_gil' and 'ensure_no_gil' precise and unambiguous.</FONT></P>

<P><FONT SIZE=2>Just my $0.02</FONT>
</P>

<P><FONT SIZE=2>Regards,</FONT>
</P>

<P><FONT SIZE=2>Grant M.</FONT>
</P>

</BODY>
<!--[object_id=#infocomp.com#]--><P><FONT face=Arial color=#808080 size=1>Important notice: This message is intended for the individual(s) and entity(s) addressed. The information contained in this transmission and any attached, may be confidential and may also be the subject of legal privilege, public interest immunity or legal professional privilege. Any review, retransmission, dissemination or other use of, taking of any action in reliance upon this information by person or entities other than the recipient is prohibited and requires authorization from the sender. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person) you may not copy or deliver this message to anyone. In such cases you should destroy this message and kindly notify the sender by reply email. </FONT></P>
<P><FONT face=Arial color=#808080 size=1>WARNING: Although Infocomp has taken reasonable precautions so that no viruses&nbsp;are present in this e-mail, the company cannot accept responsibility for any loss or damage arising from the use of e-mail attachments.</FONT></P></HTML>