chvid,
starting a new thread is not a problem per say... but the code posted by the guy above (can't remember his handle)... starts a new thread everytime a tick comes in.
this will result in thousands of threads being started, the overhead of managing them (since his code did not use thread pools) will likely dramatically be slower than not using them at all.
threading is very application specific, that is why I requested he post more details on his setup if he thinks he needs threads. I get the feeling he is sort of trying to plan for the future more than solving a present day problem.
gvi,
your point is only true on a one core machine... on a one core machine, adding extra threads would relatively slow down the processing because of the extra overhead of starting/stopping and managing them.... thus the solution would be as you suggest to ignore or aggregate some of the ticks coming in, and do it quickly enough such that you avoid the bottleneck. there are many ways to do this.
on a multi core machien however, which probably most of us have in the past few years... if processing a single thread tick stream is too slow, offloading the high latency processing off to seperate threads does increase the tick throughput of the entire system.
I think your example is very general and you're trying to say that if the data feed is too fast foro the machine, you can't really do anything. .. I am not going to touch that because it's not a very practical example. Generally speaking just handing off the tick from ib/broker/feed is very fast... <1ms... so it's really the processing you're doing where you can get into trouble. And when I say processing, I am talking about anything... building bars, ignoring ticks... all of these things require finite cycles. Some more than others. That doesn't seem to be the case here.
anyways this has turned into a sort of hypothetical thread, so unless the original poster really needs threads and can provide reasons why he thinks so I am going to bow out.