01-11-2011 11:54 AM - edited 01-11-2011 11:57 AM
Hi,
I'm trying to spawn several TCP listening threads, the number of which is dynamic based upon a configuration file which is read at runtime. With with the included code, I am attempting to open and call these listening threads from a for loop, thinking I could run through all the calls I need to make and be finished. However, since the subVI I'm calling (wait_for_and_process_messages.vi) runs a continuous while loop, the for loop in the parent VI does not continue as it is waiting for the first call to finish.
How can I design this to simply spawn off a thread each time I call the subVI and continue? The idea is to allow the number of threads be dynamic so it is not so easy compared to knowing the number of needed threads ahead of time. However, I do need to feed data to each call's nodes so I can't just use the "run" method unless there's a way to feed data to the nodes while using "run."
01-11-2011 12:04 PM
It contains code that should help you get started.
Ben
01-11-2011 12:51 PM - edited 01-11-2011 12:52 PM
You might also want to check out this example:
%LABVIEW%\examples\viserver\runvi.llb\DateServerUsingReentrantRun.vi
I came across this some weeks ago when I checked out how to dynamically call a re-entrant VI.