Re: [Pyobjc-dev] Cocoa, httplib and threads?
Brought to you by:
ronaldoussoren
From: Greg E. <gre...@ca...> - 2011-07-16 02:46:37
|
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? Some more data points: * It doesn't happen when Cocoa is used in a simple way (just create an NSApplication and call its run() method). * It also doesn't happen if I just create a PyGUI Application object and call its run() method. So it's something about my big complicated PyGUI app... :-( > Speaking of Cocoa. I don't know if you're doing anything that really requires > threaded programming or python networking. If not, consider using the > asynchronous Cocoa networking APIs. This needs to be cross-platform, so I can't rely on anything Cocoa-specific. -- Greg |