[gtkmm] Glib::Dispatcher slow response
- From: Michael Van Damme <michael vandamme vub ac be>
- To: gtkmm-list gnome org
- Subject: [gtkmm] Glib::Dispatcher slow response
- Date: Tue, 21 Oct 2003 19:18:34 +0200
I have a small multithreaded app that communicates with a device
connected to the serial port.
At the moment, there are only two threads:
1. A communication thread, that waits for data from the device
(communication with the device happens
with a kernel module).
2. The main thread (thread with the gtkmm mainloop). This thread
displays the data received from the device.
I'm using Glib::Dispatcher to display data I receive from the device in
the main thread. Sometimes,
everything works fine after starting the communication. Sometimes,
however, after starting the communication
I receive data, but is isn't being shown on the screen. The window
remains frozen for about 10 to 15 seconds
before the output starts. During this time, the commucation thread is
emitting signals through the dispatcher,
but the function that handles these signals in the main thread just
isn't being called. After about 15 seconds,
the problem disappears, and everything runs perfectly.
Does anyone know what I'm doing wrong?
] [Thread Prev