POV-Ray : Newsgroups : povray.general : Beta test version of the new mesh compressor program : Re: Meshcomp 3.0 beta3 Server Time
4 Aug 2024 00:18:33 EDT (-0400)
  Re: Meshcomp 3.0 beta3  
From: Fredrik Eriksson
Date: 30 Jan 2004 13:43:18
Message: <opr2lqb0zgzjc5hb@news.povray.org>
On 30 Jan 2004 05:05:18 -0500, Warp <war### [at] tagpovrayorg> wrote:

> StephenS <ssh### [at] ottawanet> wrote:
>> When the program is working on a large file(Optimizing), I can't go to
>> another program (POV-Ray) and back to check if it's done. The 
>> WinMeshcomp
>> window is unresponsive.
>
>   That's normal because the program is calculating in a busy-loop and 
> does
> not listen to Windows' queries.
>   I don't know how Windows programs are made "responsive" even while they
> are making heavy calculations. I suppose that they have to make some
> system call once in a while or something similar. Does anyone have a tip?

Multi-threading.
Launch a new thread for the calculations, and let the old one handle the 
GUI.

An alternative would be to do the calculations in small chunks (easy if 
there's a big loop involved) and do a message dispatch between chunks.

In my opinion, the MT approach is the preferred one. It's both cleaner and 
more robust.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.