Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multithreading or something that works like it
Message
From
07/04/2006 15:34:09
Mike Yearwood
Toronto, Ontario, Canada
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01111547
Message ID:
01111555
Views:
14
>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! :(

Your English is very good. I didn't grind my teeth once. :)
Previous
Reply
Map
View

Click here to load this message in the networking platform