hibbidiji
asked on
please help me thread my app.
I have an app that would VASTLY benefit from 30+ threads. It is on one form. I have a start and stop button that set "stopper" var. While stopper is false, the app will fire one of 2 procedures. These are nearly identical. One uses one dataset (clientdataset1) and the other users 2 datasets (clientdataset1 and clientdataset2) I will only be using one at a time and never in the same session. I personally have never used threads and get severely confused when reading about them as the verbage is unfamiliar to me. the issues that would seem to be tough are teh dataset access and the reporting of status to the main form.
Please give as detailed an answer as you can, although I appreciate that this is not an easy question.
Andrew
Please give as detailed an answer as you can, although I appreciate that this is not an easy question.
Andrew
Threads are ugly: http://www.pergolesi.demon.co.uk/prog/threads/ToC.html
if the DataSet from the first thread is one of the DataSets in the second thread ... you have to use CriticalSection...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
1)DataSets
i think better way is to work with 3 datasets
thread A: clientdataset1A
thread B: clientdataset1B and clientdataset2B
this way you do not need to use critical sections
2)reporting of status to the main form
you can use
PostMessage(MainForm.Handl e, YOUR_MESSAGE, wParam, lParam)
i think better way is to work with 3 datasets
thread A: clientdataset1A
thread B: clientdataset1B and clientdataset2B
this way you do not need to use critical sections
2)reporting of status to the main form
you can use
PostMessage(MainForm.Handl
ASKER
hard but not impossible. thanks!