Hello,

I've the following case:

- VCL mainform with a timer which updates some statistics shown
  once a second
- TWSocket as TCP-Server which gets requests from a client
- if the client sends requests as a huge bulk
  (e.g. 10.000 requests in a relatively [not completely] tight loop)
  the statistics don't get updated for a while

I know that TTimer uses windows messages as well as ICS and now I'm
looking for a way to decouple my statistic update and the receiving of
data (CPU load get's to 100% in this worst case scenario).

I've come to 2 ideas:

- set up a secondary thread for ICS (but I already have several
  threads running... ;-))
- in OnDataAvailabe check whether at least 1 sec. has been elapsed and
  the manually call OnTimer.

I'd be especially fond of the second approach but like to know whether
this can work. (can't just try it since I'm not in the office right now)

Greetings

Markus
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to