Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Has THREADING got something to do with this?
Message
De
25/05/2002 09:08:59
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
24/05/2002 22:19:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00661309
Message ID:
00661347
Vues:
23
Please put your code between < PRE > and < /PRE > tags (omit the spaces) to make your commands more legible (mainly, this will keep the spaces).

After a quick look, it seems to me that the first command, SELECT - SQL, selects another work area. This can interfere with your tests, if you forget to set it back.

Perhaps you should use the debugger, and check for alias() and recno() after each command is executed.

Regards, Hilmar.

>Everybody,
>
>THIS ONE REPLACES THE FIRST MESSAGE... all mixed up... must the beer... :-)
>
>I created a table named COMMANDS with only one field named TASK. In it, I put some records with 'commands' such as:
>
>1. SELECT TOP 1 FROM Testdata ORDER BY AMOUNT
>2. WAIT WINDOW NOWAIT 'hi'
>3. SELECT * FROM TestData WHERE ZIP='142343'
>4. DO LOOPER (JUST LOOPS THRU A 100,000 RECORD TABLE)
>5. WAIT WINDOW NOWAIT 'GOODBYE'
>
>I purposedly alternated the records with commands that will take a while to finish and some which will finish faster.
>
>I then created a form, put a timer control with interval of 1000. The timer event goes something like this:
>
>************
>
>SELECT Commands
>if thisform.first && set to .T. initially
> go top
> thisform.first = .f.
>else
> if eof()
> this.enabled = .f.
> ? 'timer disabled... last record reached'
> return
> endif
> skip
>endif
>
>? 'processing...'
>thisform.execute( commands.task )
>
>*********************
>
>The thisform.execute method goes something like this:
>
>LPARAMETER lccommandtodo
>&lccommandtodo
>? lccommandtodo + ' finished...'
>
>**********************
>
>MY QUESTION:
>
>I was hoping that the 'faster' task could be finished first even if the earlier task is still being done. Is this what 'threading' is all about?
>
>Thank you very much for any help.
>
>Dennis
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform