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 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: does IDL support multi threading [message #31086] Tue, 18 June 2002 00:08
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Ashwin wrote:
>
> 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.

Dear Ashwin


That's depends on how you have written your widget.

http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_source/idl _html/dbase/download/x_animate.tar.gz
or as idl5.5 binary
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_source/idl _html/dbase/download/x_animate.sav

For further routines or licensing please have a look at
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml


Example:
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_source/idl _work/fr_lib/examples/c3h8.anim

After loading the animation and pressing the play button every other
button
could be selected to do a different action while one action is running.
e.g. you can change the rate or the switch to loop.


I can later on explain more in detail how this is done if this
is what you like to have.

regards
Reimar

--
Reimar Bauer

Institut fuer Stratosphaerische Chemie (ICG-I)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
------------------------------------------------------------ -------
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml
============================================================ =======
Re: does IDL support multi threading [message #31099 is a reply to message #31086] Sat, 15 June 2002 12:44 Go to previous message
Paul Sorenson is currently offline  Paul Sorenson
Messages: 48
Registered: May 2002
Member
"Gary Muswick" <muswick@uhrad.com> wrote in message
news:177004ba.0206150545.4b583636@posting.google.com...
>
> 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.
>
DEMO_TOUR does this. You can see the demo tour run by typing 'demo_tour' at
the IDL prompt.

Paul Sorenson




-----------== Posted via Newsfeed.Com - Uncensored Usenet News ==----------
http://www.newsfeed.com The #1 Newsgroup Service in the World!
-----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers =-----
Re: does IDL support multi threading [message #31100 is a reply to message #31099] Sat, 15 June 2002 06:45 Go 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
Re: does IDL support multi threading [message #31126 is a reply to message #31100] Wed, 12 June 2002 07:14 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Ashwin (Ashwin.Krishnakumar@philips.com) writes:

> 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.

Ain't a gonna happen. Sorry. :-(

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: ION Script & Netscape Server
Next Topic: Hankel Transform in IDL

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

Current Time: Sat Oct 11 08:50:42 PDT 2025

Total time taken to generate the page: 0.56577 seconds