Alexey Kachayev added the comment:

Updated diff with:
 * fix object leaks
 * tp_clear
 * additional test for maxsize < 0

I also reimplemented multithreading test (fixed error and added skip rule). But 
actually, I'm not sure that it's enough for ensuring thread-safety of clear 
operation. I'm working on other variant now. I will be appreciated for any 
advice about where to find example of the same (or close enough) test cases 
from other modules.

Regarding to previous comments from review. 

1. "guard against negative numbers"

I added special test case for negative maxsize in order to show, that now C 
version works the same as Python one. So, should we change both implementation? 
What behavior is most logical here? Reimplementation will change public API, so 
it's not only about acceleration.

2. Use regular PyObject instead of lru_list_elem.

What the problems are with current implementation?

----------
Added file: http://bugs.python.org/file28498/14373.v9.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14373>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to