Re: Question about GTK+ and timers



Hi,

On Thu, Apr 7, 2011 at 11:15 AM, Paul Davis <paul linuxaudiosystems com> wrote:
> On Thu, Apr 7, 2011 at 2:07 PM, Igor Korot <ikorot01 gmail com> wrote:
>
>>> Now you can hook up a call-back:
>>>    RxEventSrc = g_io_add_watch ( hFile, G_IO_IN, HandleAsyncRx, (gpointer)Instance );
>>
>> But isn't it the same as registering the timer?
>
> not at all.
>
>> And this is done the same way as the timer: it creates thread and
>> performs this function in it, right?
>
> not at all. your callback is executed in the thread running the event
> loop but not based on a timer - based on when actual data arrives from
> the serial port.

So is there one thread or two? ;-)

Thank you.

>
> --p
>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]