threads
- From: "Dr. Gerhard Dieringer" <GDieringer compuserve com>
- To: gtk-list <gtk-list gnome org>
- Subject: threads
- Date: Wed, 16 Aug 2000 18:15:17 +0200
Hi all,
I have the following problem: I want to controll a GTK-application with
the IR remote controll
(IRRC) of my hauppauge tv card. My first solution was to write a
function, that looks if a key
was pressed on the IRRC and emit a 'clicked'-signal for the
corresponding GTK-button-widget.
The function is called via gtk_idle_add whenever GTK is idle. This
solution works, but because
the function is called ***very often***, I get a CPU-usage of 100%.
The next idea was to start two pthreads, one runs the gtk_main_loop and
the other tries to
read the IRRC-data, without first looking, if data is available. This
'solution' doesn't waste
CPU-time, but it has the drawback, that it doesn't work :-((.
I got the following error message:
Gdk-ERROR **: BadLength (poly request too large or internal Xlib length
erro
serial 726 error_code 16 request_code 15 minor_code 0
So my questions are:
Is it possible to send signals from one pthread to another one, that
runs the gtk_main_loop?
How do I do it?
Are there examples to steal the code from?
Gerhard
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]