Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Multithreading or something that works like it
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01111547
Message ID:
01111616
Vues:
10
>Hi,
>
>I have a program that reads the serial port for data sent by an external device. I do this using a timer that calls a DLL function every N miliseconds (in this case we are using values from 10 to 50 milisecons). Based on the data received from the serial port, a set of function is called and some SQL commands are executed using ODBC (the connection was previously opened). My problem is that while the ODBC command is executing (it takes around 5 seconds because there are triggers that update a lot of tables), no access is made to the serial port, and that causes some sluggish performance when there are too much data to read.
>
>I was thinking about using one "thread" to read the serial port and place the data into a list, and having N other "threads" to read the list and if necessary run the ODBC commands.
>
>Now the BIG question? How to do that in VFP? Maybe I can achieve this behaviour using timers with differente intervals?
>
>Thanks in advance.
>
>P.S.: Sorry for my bad english! :(

You could have a look at http://www.ozfox.com.au/assets/Threader.zip
Cheers,
Jamie
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform