Use a loop that calls a new thread that calls a function that runs your Win32::Process::Create. Use join and have the socket return the result of the join.
David Smackdab wrote: > Hi all, > I have been looking forward to iThreads for some time, but never had the > chance to look at them until now. > I am a Win32er, so I don't have the normal experience that most folks do > with fork(), so bear with my question ;-) > I have a Tk program that calls Win32::Process::Create to spawn off > commands and then I use a socket to send the data back to the parent. > This far far too slow to be workable...creating processes on Win32 is slow. > I would like to create 1 Win32::Process (child) and then send it commands, > which it would in turn create a new iThread to handle each request and then > use the main socket connection to the parent...(each iThread would likely be > making a system call, which would then *really* be a thread in the main > Win32 .exe) > For the child process via fork(): > The docs say the state of the interpreter is cloned because "normal" fork() > works this way, do I want a fork(); exec(); ??? > But the docs state that exec() spawns a Win32::Process... > Is there a way around this? I really am stuck w/o something much faster! > Can I do a single forkexec() ? > thanks! > BTW, I read the long discussions on the other news groups about iThreads, > and I think the only thing wrong is maybe the name. Having worked at a > few big companies, the name really affects people's perceptions and I have > had a project killed because of the confusion that resulted...Just change it > for 5.8.1 (easier now than 9.x ;-) [just my .02]
