I'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"><<a href="mailto:neologix@free.fr">neologix@free.fr</a>></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'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: "why do we have both a C and Python version?".<br>
Here's Antoine answer (he suggested to me to bring this up on python-dev":<br>
"""<br>
The C version is quite recent, and there'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't think it's the case for an RLock)<br>
"""<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 "school of thought"?<br>
<br>
Also, while we're at it, Victor created #13550 to try to rewrite the<br>
"logging hack" 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>