存档

文章标签 ‘超时’

谈事件驱动模型中的“超时”(Timeout)处理

2010年3月18日 2 条评论

写在最前面:本文是作者在开发爬虫程序时的一些体会,分享一下,希望能给读者朋友一点点帮助。

通常,在事件驱动模型的程序中,会有一个事件处理模块,我们称之为EventProcessor,还会有一个事件检测模块,我们称之为EventMonitor。下面是一般的处理流程:
(1)EventProcessor在发出对某一个事件的请求后,不会去等待事件结果的返回,而是返回去做其它的工作
(2)当EventMonitor模块收到上述事件的返回结果后的,它就会发消息通知EventProcessor
(3)EventProcessor收到消息后的,开始处理上述事件的结果 阅读全文…


Warning: mysql_query() [function.mysql-query]: Access denied for user 'root'@'localhost' (using password: NO) in /home/wuzeshengpwmuqzeeas7h4eknug/wwwroot/wp-content/plugins/quickstats/quickstats.php on line 345

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/wuzeshengpwmuqzeeas7h4eknug/wwwroot/wp-content/plugins/quickstats/quickstats.php on line 345

Warning: mysql_query() [function.mysql-query]: Access denied for user 'root'@'localhost' (using password: NO) in /home/wuzeshengpwmuqzeeas7h4eknug/wwwroot/wp-content/plugins/quickstats/quickstats.php on line 346

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/wuzeshengpwmuqzeeas7h4eknug/wwwroot/wp-content/plugins/quickstats/quickstats.php on line 346

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/wuzeshengpwmuqzeeas7h4eknug/wwwroot/wp-content/plugins/quickstats/quickstats.php on line 346