comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: does IDL support multi threading
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: does IDL support multi threading [message #31100 is a reply to message #31099] Sat, 15 June 2002 06:45 Go to previous messageGo to previous message
muswick is currently offline  muswick
Messages: 10
Registered: April 1998
Junior Member
"Ashwin" <Ashwin.Krishnakumar@philips.com> wrote in message news:<3d073a06$0$229$4d4ebb8e@read-nat.news.nl.uu.net>...
> I have a GUI written using IDL .When a procedure is executing i am not able
> to select/click any button on GUI.i.e the GUI is completely inactive and
> does not respond to the user inputs untill the procedure is completed. How
> to make the GUI have a higher priority than other procedures.

IDL does not support true multithreading, but there are a few tricks.

Here are two solutions you can try (there are others, but it gets more
complicated.)

First, If the procedure you are executing is working on data that the
GUI doesn't need access to, e.g. you have a large volume of data and
you want perform a series of operations, like a radon transform
reconstruction and save the results to a file for later display, then
you could save your data, write the procedures to a batch or script
file, then spawn off a second IDL session with /nowait to do the work.
Have the script create a done.dat file when it is done. (if you
running Unix you can use a pipe to communicate) Have your GUI check
periodically for the existance of the done.dat file. The OS handles
the the multi-processing.

Second, If the procedure you are working with has a big loop and the
cpu time per loop is small, then you can call WIDGET_EVENT within your
loop and handle the events of your GUI yourself. If there are no
events, then you go right back to processing another loop iteration.
I have done this many times, and it works quite well. However - be
careful to block GUI events you don't want repeated. E.g. if your
loop was to process a hundred CT images and create output files, you
don't want to invoke it a second time if the first one is not done.
The easiest way to do this, is set the widgets you don't want to
re-invoke with a sensitive=0. When your done processing, make the
widget sensitive again.

Gary Muswick
University Hospitals of Cleveland
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: ION Script & Netscape Server
Next Topic: Hankel Transform in IDL

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 14:56:25 PDT 2025

Total time taken to generate the page: 1.51902 seconds