Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I create a multi-threaded program

Status
Not open for further replies.

ugagrad

Programmer
Sep 12, 2003
49
US
I was wondering if anyone had any sample code of a multi-threaded FoxPro .prg. I have tried to find documentation online but it is very scarce.
Thanks in advance
[laser]
 
What is it that you want to do multi threaded?

Essentially, VFP doesn't support multithreading.

However, you can accomplish MT to a certain extent by building routines with no UI into a multi threaded DLL (which is an option when building an app from a project with VFPv6 (SP5 I think) and newer). Then, when calling the routines in that DLL, presumably they run multithreadedly.

However, if VFP is the calling program, since it can only call one routine at a time, this would seem to offer limited benefits, unless several VFP programs running on the same machine are calling the DLL routines at the same time.

Because of this, the MT DLLs seem most useful in a web server situation, where many (web) clients actually might be calling the routines in the DLLs at the same time.
 
no wonder i couldn't find anything good. Guess I will have to try to find a new solution to my problem. Thank you anyway.
 
VFPs nature is such, multithreading is not native.

You can see something under the topic..
Control of Call Blocking in VFP.

VFP provides 'SingleUse Objects and Apartment-model' threading as ways of controlling issues of call blocking.

If we are talking about doing jobs simultaneously, that is using COM or allowing multiple forms/reports at the same time, then I would call that multi-user. But I am sure, you are talking about true multithreading.

:)


ramani :)
(Subramanian.G)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top