I&#39;m pretty sure the Python version of RLock is in use in several alternative implementations that provide an alternative _thread.lock. I think gevent would fall into this camp, as well as a personal project of mine in a similar vein that operates on python3.<br>
<br><div class="gmail_quote">2012/1/6 Charles-François Natali <span dir="ltr">&lt;<a href="mailto:neologix@free.fr">neologix@free.fr</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
Issue #13697 (<a href="http://bugs.python.org/issue13697" target="_blank">http://bugs.python.org/issue13697</a>) deals with a problem<br>
with the Python version of threading.RLock (a signal handler which<br>
tries to acquire the same RLock is called right at the wrong time)<br>
which doesn&#39;t affect the C version.<br>
Whether such a use case can be considered good practise or the best<br>
way to fix this is not settled yet, but the question that arose to me<br>
is: &quot;why do we have both a C and Python version?&quot;.<br>
Here&#39;s Antoine answer (he suggested to me to bring this up on python-dev&quot;:<br>
&quot;&quot;&quot;<br>
The C version is quite recent, and there&#39;s a school of thought that we<br>
should always provide fallback Python implementations.<br>
(also, arguably a Python implementation makes things easier to<br>
prototype, although I don&#39;t think it&#39;s the case for an RLock)<br>
&quot;&quot;&quot;<br>
<br>
So, what do you guys think?<br>
Would it be okay to nuke the Python version?<br>
Do you have more details on this &quot;school of thought&quot;?<br>
<br>
Also, while we&#39;re at it, Victor created #13550 to try to rewrite the<br>
&quot;logging hack&quot; of the threading module: there again, I think we could<br>
just remove this logging altogether. What do you think?<br>
<br>
Cheers,<br>
<br>
cf<br>
_______________________________________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/python-dev" target="_blank">http://mail.python.org/mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="http://mail.python.org/mailman/options/python-dev/anacrolix%40gmail.com" target="_blank">http://mail.python.org/mailman/options/python-dev/anacrolix%40gmail.com</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>ಠ_ಠ<br>