VFP9SP2 Win7Pro
Had a long running Quickbooks query from VFP (via QODBC tool) take forever. I launched a 2nd instance of VFP to work on something totally different. While editing some code in a PRG, my 2nd VFP session hangs. I leave it, come back HOURS later, still hung. Both VFP sessions. I'm guessing this is because it's single-threaded (although I'll be the first to admit I'm not a threading expert).
Ideas?
Thanks, --Curious in Maryland
"SingleThreaded" has nothing to do with running multiple instances on the same box. It just means that each instance does use only one main processor-command-pipe. Which isn't even the case with VFP9, which technically uses at least 8 threads already. (see taskmanager/details and add column "Threads")
Each VFP instance is completely isolated from another VFP instance, Windows takes care of separating the memory and address-spaces for each task. You can't just change a memory variable and hope that it would get picked up by another VFP session.
On a higher level, "SingleThreaded" is mostly used as in "this software can only do one job at a time", whereas "multithreaded" often get used as in "does multiple tasks parallel"
In your case I suspect a deadlock at the FoxUser.dbf, which is used by both instances at the same time, since both use the same config.fpw and settings.
wOOdy
-----Ursprüngliche Nachricht----- Von: ProFox [mailto:profox-bounces@leafe.com] Im Auftrag von mbsoftwaresolutions@mbsoftwaresolutions.com Gesendet: Mittwoch, 6. Dezember 2017 01:00 An: ProFox profox@leafe.com Betreff: 2 VFP sessions running; 1 hangs and so does the other
VFP9SP2 Win7Pro
Had a long running Quickbooks query from VFP (via QODBC tool) take forever. I launched a 2nd instance of VFP to work on something totally different. While editing some code in a PRG, my 2nd VFP session hangs. I leave it, come back HOURS later, still hung. Both VFP sessions. I'm guessing this is because it's single-threaded (although I'll be the first to admit I'm not a threading expert).
Ideas?
Thanks, --Curious in Maryland
[excessive quoting removed by server]
And related to wOOdy's suggestion, do you have a startup PRG configured? Perhaps it's trying to do something in conflict with the first instance.
--
rk
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Jürgen Wondzinski Sent: Wednesday, December 06, 2017 2:14 PM To: profoxtech@leafe.com Subject: AW: 2 VFP sessions running; 1 hangs and so does the other
"SingleThreaded" has nothing to do with running multiple instances on the same box. It just means that each instance does use only one main processor-command-pipe. Which isn't even the case with VFP9, which technically uses at least 8 threads already. (see taskmanager/details and add column "Threads")
Each VFP instance is completely isolated from another VFP instance, Windows takes care of separating the memory and address-spaces for each task. You can't just change a memory variable and hope that it would get picked up by another VFP session.
On a higher level, "SingleThreaded" is mostly used as in "this software can only do one job at a time", whereas "multithreaded" often get used as in "does multiple tasks parallel"
In your case I suspect a deadlock at the FoxUser.dbf, which is used by both instances at the same time, since both use the same config.fpw and settings.
wOOdy
-----Ursprüngliche Nachricht----- Von: ProFox [mailto:profox-bounces@leafe.com] Im Auftrag von mbsoftwaresolutions@mbsoftwaresolutions.com Gesendet: Mittwoch, 6. Dezember 2017 01:00 An: ProFox profox@leafe.com Betreff: 2 VFP sessions running; 1 hangs and so does the other
VFP9SP2 Win7Pro
Had a long running Quickbooks query from VFP (via QODBC tool) take forever. I launched a 2nd instance of VFP to work on something totally different. While editing some code in a PRG, my 2nd VFP session hangs. I leave it, come back HOURS later, still hung. Both VFP sessions. I'm guessing this is because it's single-threaded (although I'll be the first to admit I'm not a threading expert).
Ideas?
Thanks, --Curious in Maryland
[excessive quoting removed by server]
How do I add Threads? I'm running Win 10 Home - do I need Pro?
John
John Weller 01380 723235 07976 393631
"SingleThreaded" has nothing to do with running multiple instances on the same box. It just means that each instance does use only one main processor-command-pipe. Which isn't even the case with VFP9, which technically uses at least 8 threads already. (see taskmanager/details and
add
column "Threads")
Also on Pro. What I did was:
Right-mouse click on the task bar and select "Task Manager"
Click the tab labeled "Details"
Click the column header of the table and select "Select Columns"
Tick the "Threads" checkbox
On Wed, Dec 6, 2017 at 4:38 PM, John Weller john@johnweller.co.uk wrote:
How do I add Threads? I'm running Win 10 Home - do I need Pro?
John
John Weller 01380 723235 07976 393631
"SingleThreaded" has nothing to do with running multiple instances on the same box. It just means that each instance does use only one main processor-command-pipe. Which isn't even the case with VFP9, which technically uses at least 8 threads already. (see taskmanager/details and
add
column "Threads")
[excessive quoting removed by server]
Thanks Ted, not available on Home - such is life, only curiosity :-)
John
John Weller 01380 723235 07976 393631
Also on Pro. What I did was:
Right-mouse click on the task bar and select "Task Manager"
Click the tab labeled "Details"
Click the column header of the table and select "Select Columns"
Tick the "Threads" checkbox
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
-----Ursprüngliche Nachricht----- Von: ProFox [mailto:profox-bounces@leafe.com] Im Auftrag von John Weller Gesendet: Mittwoch, 6. Dezember 2017 22:38 An: profox@leafe.com Betreff: RE: 2 VFP sessions running; 1 hangs and so does the other
How do I add Threads? I'm running Win 10 Home - do I need Pro?
John
John Weller 01380 723235 07976 393631
"SingleThreaded" has nothing to do with running multiple instances on the same box. It just means that each instance does use only one main processor-command-pipe. Which isn't even the case with VFP9, which technically uses at least 8 threads already. (see taskmanager/details and
add
column "Threads")
[excessive quoting removed by server]
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
On 2017-12-06 14:14, Jürgen Wondzinski wrote:
"SingleThreaded" has nothing to do with running multiple instances on the same box. It just means that each instance does use only one main processor-command-pipe. Which isn't even the case with VFP9, which technically uses at least 8 threads already. (see taskmanager/details and add column "Threads")
Each VFP instance is completely isolated from another VFP instance, Windows takes care of separating the memory and address-spaces for each task. You can't just change a memory variable and hope that it would get picked up by another VFP session.
On a higher level, "SingleThreaded" is mostly used as in "this software can only do one job at a time", whereas "multithreaded" often get used as in "does multiple tasks parallel"
In your case I suspect a deadlock at the FoxUser.dbf, which is used by both instances at the same time, since both use the same config.fpw and settings.
Excellent...thanks, wOOdy!