Re: [Pyobjc-dev] Cocoa, httplib and threads?
Brought to you by:
ronaldoussoren
|
From: Ronald O. <ron...@ma...> - 2011-07-17 14:59:54
|
On 16 Jul, 2011, at 4:46, Greg Ewing wrote:
> This is getting extremely weird. It turns out that the
> thread is hanging on the following line in httplib.py:
>
> host_enc = self.host.encode("ascii")
>
> where the string being encoded in my test case is
> '127.0.0.1'.
>
> I can't for the life of me imagine what the ascii codec
> could be doing to cause a thread to block.
>
> Can anyone with more knowledge of the codec system
> shed any light?
Not really. Have you tried getting a C stacktrace using gdb? The only obvious reason for blocking is the GIL: if for some reason the main thread doesn't release the GIL at some point you'll get a hang in the secondary threads. That's pretty unlikely though given that the secondary thread does some work before it hangs.
Debugging would be easier if you had a smallish sample program (a dependency on PyGUI would be fine)
Ronald
|