Re: Cocoa, httplib and threads?
Ronald Oussoren <[email protected]>
| Newsgroups | gmane.comp.python.pyobjc.devel |
|---|---|
| Message-ID | <[email protected]> |
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
------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric
Ries, the creator of the Lean Startup Methodology on "Lean Startup
Secrets Revealed." This video shows you how to validate your ideas,
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
Pyobjc-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyobjc-dev
smime.p7s
(application/pkcs7-signature, 2.2 KB) - not displayed