Subject | TimerInterval in multi-threaded app |
---|---|
Author | aosylvain |
Post date | 2006-01-11T10:07:23Z |
Hi all,
I'm working on a multi-threaded application. I took as a
starting point the "Threads" demo. In this demo, the TimerInterval
property of the IB_Session is set to 5000 (default value).
But in the help file for this property, it is written :
"If you are creating a DataModule for use in secondary threads,
setting the value to either 0 or 5000 will result in no timer active
in the secondary thread. This is recommended, for the reason described
above. What you should do is to make the thread which owns the session
call the DoTimer method directly, as a part of its own loop or workload."
So, should I set it to 0 or 5000 ?
If I set it to zero, when exactly should I call the DoTimer method ?
I'm working on a multi-threaded application. I took as a
starting point the "Threads" demo. In this demo, the TimerInterval
property of the IB_Session is set to 5000 (default value).
But in the help file for this property, it is written :
"If you are creating a DataModule for use in secondary threads,
setting the value to either 0 or 5000 will result in no timer active
in the secondary thread. This is recommended, for the reason described
above. What you should do is to make the thread which owns the session
call the DoTimer method directly, as a part of its own loop or workload."
So, should I set it to 0 or 5000 ?
If I set it to zero, when exactly should I call the DoTimer method ?