speechd-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems with "end" callback in Python


From: Hynek Hanke
Subject: Problems with "end" callback in Python
Date: Wed, 23 Apr 2008 11:50:30 +0200

Hello James,

it is an interesting problem. I think pygtk needs to be fixed if it
seems to behave so badly with other libraries using threads.
This has little to do with speech callbacks specifically. More
important is the thing that when you run basic system functions
like socket.recv() from other threads, they behave badly.
Would you like to raise this issue with the PyGTK developers
to see if it is possible to fix it or to use PyGTK in some other
way that avoids the conflict?

As a workaround, you can try to avoid the pygtk loop and do
your own asynchronous thread to highlight the words. Threads
are easy in Python. However, unless we find out where in
PyGTK the problem lies exactly, it is always possible, that you will
run into the very same problems and they will prevent your
thread to work correctly.

Anyway, old or new implementation of speechd, threads will
always be used in the python communication library, since they
are technically necessary to handle asynchronous callbacks.
So it would be very useful to try to find a solution with pygtk.

With regards,
Hynek Hanke







reply via email to

[Prev in Thread] Current Thread [Next in Thread]