[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Active objects, threads, signals & slots
From:       Michael Schuerig <schuerig () acm ! org>
Date:       2002-11-06 0:45:49
[Download RAW message or body]

On Wednesday 06 November 2002 00:55, Kevin Krammer wrote:
> On Mittwoch, 6. November 2002 00:13, Michael Schuerig wrote:
> > I'm dealing with a library where calls can take some time (reading
> > data from a mobile phone) and I need to poll in and endless loop
> > (waiting for incoming SMS messages).
>
> Polling can be done with QTimers

Yep. But that wouldn't help in this case, although my description was 
too spotty. The general structure here is

while (true) {
    wait_for_something_to_happen_with_timeout
    if (something_happened) {
        process
    }
    if (userCancelled) {
        do_a_clean_exit
    }
}

Most of the time is spent waiting.

> Hmm, maybe you could use KProcIO or KProcess.
> Depends on how complex the data is that you have to pass to the
> lib/get from the lib.

I just want to read SMS messages stored in a mobile phone. For some 
reason, transmitting them takes some time. It produces a noticable 
delay to get my meager 15 messages. During this time the UI just 
doesn't look and behave nice.

Michael

-- 
Michael Schuerig                  If at first you don't succeed...
mailto:schuerig@acm.org           try, try again.
http://www.schuerig.de/michael/   --Jerome Morrow, "Gattaca"

 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic