[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Making speech-dispatcher python API support asynchronous socket communic
From: |
Tomeu Vizoso |
Subject: |
Making speech-dispatcher python API support asynchronous socket communication |
Date: |
Fri, 20 Jun 2008 12:16:37 +0200 |
On Fri, Jun 20, 2008 at 12:08 PM, Hemant Goyal <goyal.hemant at gmail.com>
wrote:
>
> When the handshaking is taking place the gtk mainloop has not yet started
> and hence we cannot rely on the event generated by gobject to read data off
> the socket. And if this handshaking does not take place the API
> implementation blocks the entire process thus leading to a deadlock. Now I
> figured that we can allow the polling thread to exist until the handshaking
> takes place and then shift to the gobject method of monitoring the socket. I
> achieve this by defining a variable self._first_run. When the handshaking
> completes I make the polling thread exit (by calling close_thread(self) from
> the main control thread) . In this time frame I expect that the gtk mainloop
> will start itself (I am quite sure that it does start actually).
What about initializing the connection (and thus do the handshaking)
in an idle event?
http://www.pygtk.org/docs/pygobject/gobject-functions.html#function-gobject--idle-add
I guess that the speechd maintainers don't wish to add a gobject
dependency to their packages, right? If the python API exposed the
socket and a couple of functions, the caller could be responsible for
providing integration with whatever main loop it wishes to use
(gobject or qt, for example).
Regards,
Tomeu
- Making speech-dispatcher python API support asynchronous socket communication, Hemant Goyal, 2008/06/20
- Making speech-dispatcher python API support asynchronous socket communication,
Tomeu Vizoso <=
- Making speech-dispatcher python API support asynchronous socket communication, Tomas Cerha, 2008/06/20
- Making speech-dispatcher python API support asynchronous socket communication, Hynek Hanke, 2008/06/20
- Making speech-dispatcher python API support asynchronous socket communication, Tomas Cerha, 2008/06/20
- Making speech-dispatcher python API support asynchronous socket communication, Tomeu Vizoso, 2008/06/22
- Making speech-dispatcher python API support asynchronous socket communication (long), Hynek Hanke, 2008/06/23
- Making speech-dispatcher python API support asynchronous socket communication (long), Tomeu Vizoso, 2008/06/23
- Making speech-dispatcher python API support asynchronous socket communication (long), Hemant Goyal, 2008/06/23
- Making speech-dispatcher python API support asynchronous socket communication, Hemant Goyal, 2008/06/21
- Making speech-dispatcher python API support asynchronous socket communication, Tomas Cerha, 2008/06/23
Making speech-dispatcher python API support asynchronous socket communication, Hynek Hanke, 2008/06/23