Re: [gtkmm] Glib::SignalIO
- From: Peter Gasper <pgasper designadvantage com>
- To: Tassos Bassoukos <abas aix meng auth gr>
- Cc: gtkmm-list gnome org
- Subject: Re: [gtkmm] Glib::SignalIO
- Date: 29 Aug 2003 14:41:30 -0600
On Fri, 2003-08-29 at 14:06, Tassos Bassoukos wrote:
> Hello Peter,
> The problem is that the on_input_received method is an instance method,
> which requires an instance to be invoked. You will need to make the
> method static. If you have several instances of the class, simply create
> a static member method that determines the appropriate instance for that
> method.
Ya, I knew why it wouldn't work, I just couldn't see a way around it.
Thanks.
> Umm... you have selected *reading* only for that SignalIO, correct?
Yes.
> >>From the documentation it also appears that all Glib::SignalIO does is poll fd, which
> > I can do myself, but I was trying to avoid polling (which is more CPU intensive).
>
> IIRC (and I think I do), Glib::SignalIO adds the specified fd to the
> select syscall at the heart of the event loop. On some systems, this
> might be implemented as poll(), but this will not affect your programm[0]
>
> >
> > Any ideas?
>
> You could allways use a separate thread for the reading.... Just an idea.
I am already doing that.
>
> Tassos
> [0] Unless of course you have a need of real-time communication with the
> serial port, without any buffering, in which case the case needs
> reconsidering.
Hard real-time, no. But as quick as possible. This is also running on an
embedded processor without a lot of power, hence why I want to avoid
polling.
thanks for the help.
--
Peter Gasper <pgasper designadvantage com>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]