[fxruby-users] Updating GUI while doing slow IO-operations

Kenneth Juul kennetha at stud.ntnu.no
Sat Oct 6 07:32:21 EDT 2007


I've tried the easy way out, Lyle's suggestion using FXApp::addInput.
It seems like this does NOT do the trick.

I'll post the solution that works, if I can make it that is.

Regards,
K

On 9/22/07, Kenneth Juul <kennetha at stud.ntnu.no> wrote:
> Thanks for your answers guys,
> I have not yet tried your suggestions, but I will.
>
> I'll let you know as soon as I do.
>
> K.
>
>
> On 9/21/07, Lyle Johnson <lyle at lylejohnson.name> wrote:
> >
> > On Sep 20, 2007, at 1:59 AM, Kenneth Juul wrote:
> >
> > > I have made a rather large program in Ruby for use in Windows. The
> > > user interface is made with fxruby, of course. The program is
> > > "talking" to a small embedded computer over both serial and ethernet
> > > interfaces. Some of this communication is taking a while, several
> > > minutes actually, and this is when my problem occurs:
> > >
> > > During slow, time consuming operations, the GUI freezes / hangs.
> > > Sometimes it just turn "windows-white" and stays like this until the
> > > IO is done, other times it just freezes the last window until IO is
> > > done.
> > >
> > > I have done some vague attempts on starting of the IO withing separate
> > > threads without any improvement. I also have tried some calls to
> > > flush(), forceRefresh(), refresh(), update() and so on, without any
> > > improvement.
> > >
> > > Enlighten me please!
> >
> > The problem with using Ruby threads for the I/O is that they'll block
> > the whole application. You might be able to use the FXApp#addInput
> > API (see the input.rb example program), although I've never tried to
> > use it with network I/O.
> > _______________________________________________
> > fxruby-users mailing list
> > fxruby-users at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/fxruby-users
> >
> >
>
>
> --
> Mvh
> Kenneth Juul
>
> mob/tlf 99008269 / 73514449
>


-- 
Med vennlig hilsen
Kenneth Juul


More information about the fxruby-users mailing list