One thread freezes my whole application
Anders J. Munch
ajm at flonidan.dk
Wed Sep 29 14:01:56 CEST 2004
"Michael Zhang" <jianqiz at bigpond.com> wrote:
> The problem is when I click the connection button and invoke that
> connection thread, the whole application (including base thread and
> display thread) was frozen. What I expected was when one thread is
> listerning the socket, the display thread should be able to continue its
> running, and I should be able to invoke other (if any) threads from the
> GUI base thread. Afterwards, I had to use ps/kill to clean them up.
> def run(self):
> Cmodule.create_connection() # Cmodule is created from C
Do I understand you correctly that Cmodule is a C extension?
If create_connection includes C code that does blocking I/O without
releasing the global interpreter lock, your whole application will
block. Perhaps that's what you're seeing.
More information about the Python-list