Re: Multithreading in IDL [message #44878 is a reply to message #44875] |
Tue, 26 July 2005 05:06   |
tdaitx
Messages: 5 Registered: July 2005
|
Junior Member |
|
|
IDL itself can be set to run multithread even on a single processor
system. Simply run CPU, TPOOL_NTHREADS = NumThreads and you're set.
So far my experience says that on Linux there'll be a process for each
thread and on Windows all I could get was a single process, no matter
what - maybe I'm doing something wrong, but my guess is that is the way
multithreading works on Windows (note that I neither own a SMP system
nor have access to one).
Now, if you're asking about threading support for your code, I must say
that IDL doesn't provide any means to do it (someone please correct me
if I'm wrong here). If you want your code to spawn some threads and get
a handle of it you'll have to wait till RSI decides to support thread
programming.
A creepy way I can think of to let a piece of code running in the
background while a main program runs (or not if you want so) is
creating a base widget with Map 0 and register it with Xmanager using
the No_Block keyword, since Xmanager can run tasks in the background.
It's an ugly workaround and I didn't dare to try it (yet), but it's
there if someone wants to give it a shot.
And, finally, you can always choose to use call_external or link_image,
but it's almost the same as using the Xmanager trick, what you get is
multiprocessing, not multithreading. Take a look at the Multithreading
topic
( http://groups-beta.google.com/group/comp.lang.idl-pvwave/bro wse_thread/thread/f49fb0d9810cd530/b51116bb6b96cf71)
Regards,
Tiago S Daitx
|
|
|