Thanks Woody.
John
John Weller 01380 723235 07976 393631
Hi John,
Oh boy, what did I do? No, you can't add threads. That's VFP internal,
some
are used for the timer event, some for grids/browse.... VFP itself is a single-job language: You start one program and it runs til the end. That's
it. If
you call a subroutine, the main program stops until the subroutine is
finished.
Single job, single thread.
We do have a "Multithread" runtime library: vfp9T.dll (T as in Thread),
which
is especially useful for COM-Servers, which are called from several
threads of
a webserver. It solves some issues with memory usage (since not every Web-Session starts a new VFP), but also brings in new problems because those user-sessions aren't completely independent.
What you may want to play with: ParallelFox on VFPX: https://github.com/VFPX/ParallelFox
It is basically an extension to span new VFP tasks from within your main program (called "worker threads") to do subroutines without halting the main program. Coordinating those routines and getting notified about thier finish is the complicated part, and that's what this library does quite
nicely.
wOOdy