【发布时间】:2012-02-01 07:55:56
【问题描述】:
我有一个线程从 Web 服务轮询数据,然后将其发送到不同的类来处理数据。该数据的处理可能需要很长时间,有时超过调用线程内轮询函数的计时器间隔。
我想保护这个轮询功能,就是在处理数据的过程中,不要进入这个功能。
我的流程是这样的
workerThread -> start timer -> that invoking the polling method ->
the polling method gets the data and send it to processing > mean while this polling function can be called again .
【问题讨论】: