Vitja Makarov, 21.11.2010 09:29:
> 2010/11/21 Stefan Behnel:
>> Vitja Makarov, 21.11.2010 00:02:
>>> I added patch to runthreads to check thread state at exit.
>>>
>>> http://trac.cython.org/cython_trac/attachment/ticket/596/runtests-check-threads.patch
>>
>> This isn't really related to ticket #596 (just like the fix for ticket #537
>> wasn't). In any case, this should be done after each test, not at
>> interpreter exit time. It sounds wrong if any thread (even a deamon thread)
>> is still alive after running a test.
>>
>
> Sure that's a different issue.
>
> You've pushed check_thread_termination() it seems to me that it only
> checks, and don't help python interpreter to exit.
> So we can find this tests and disable. Or hook threading._shutdown and
> allow python quit.

You're right, I think we need both. I pushed a fix that (I hope) handles 
both cases.


> Think we should open new ticket for thread issue

The test runner hasn't really been a reason to open tickets before. When we 
find bugs, we just fix them.


> it seems to be related to GIL, right?

No, just to threading in general. It's not even a problem with the compiler 
(i.e. what users would normally see), just with the test support. The 
support for running CPython regression tests is really rudimentary. We just 
compile what we find and let unittest look for anything it thinks it can 
deal with. To do it right, we'd have to emulate CPython's own test runner 
to make sure we ignore abstract test classes and the like. We may have to 
do that at some point, now that we are getting closer and closer to the 
point that most tests should "just work". But as long as it's enough to 
disable a hand full of test modules, I don't feel obliged to put much 
effort into this. After all, most of the tests just heavily deal with the 
standard library, so they really aren't that telling w.r.t. Cython.

Stefan
_______________________________________________
Cython-dev mailing list
Cython-dev@codespeak.net
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to