g_main_loop and persistant connections
- From: Matías Alejandro Torres <torresmat gmail com>
- To: gtk-app-devel-list gnome org
- Subject: g_main_loop and persistant connections
- Date: Sun, 08 Jul 2007 23:37:14 -0300
Hi, I'm having problems to design a python network application, that is
like a messenger.
In this app, the user would be able to send and receive messages. There
are persistant connections involved, mainly because it is possible to
receive messages asyncronously.
I would like to handle these permanent connections in differents
threads, so the GUI doesn't halt when sending, receiving or even
wainting a message, but....
*How the main thread (the GUI, locked in g_main_loop) is awaken by the
connection handler threads when a message arrives????
*
I don't understand how the connection threads call functions that should
be run in the main thread when this one is iterating the main loop. *Can
different threads make modifications in the widgets?* (using the
appropiate locks, barriers when needed).
Can someone point to a nice howto/tutorial about this? Any help would be
appreciate since I've never written an application like this and I am
kind of fully-lost about this.
Thanks in advance, even for reading up to here.
Matías
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]