今天在用爬虫时gevent报了AssertionError: Impossible to call blocking function in the event loop callback异常,很奇怪,难道是patch_socket惹的货,因为之前没有使用patch_socket是正常的,代码简化如下import urllib
import gevent
from gevent.monkey im...
分类:
其他好文 时间:
2014-11-12 16:40:58
阅读次数:
340
当谈及 Lock-Free 编程时,我们常将其概念与 Mutex 或 Lock 联系在一起,描述要在编程中尽量少使用这些锁结构,降低线程间互相阻塞的机会,以提高应用程序的性能。类同的概念还有 "Lockless" 和 "Non-Blocking" 等。实际上,这样的描述只涵盖了 Lock-Free ...
分类:
其他好文 时间:
2014-10-24 09:15:55
阅读次数:
251
启用了BPDU Guard特性的端口在收到BPDU的时候会使端口进入err-disable状态,从而避免桥接环路。一般BPDU Guard是和PortFast结合使用,在端口上启用了PortFast之后,如果没有启用BPDU Guard,那么端口收到BPDU的时候,STP会让端口进入blocking...
分类:
其他好文 时间:
2014-10-20 11:36:11
阅读次数:
161
The title sounds a bit awkward, let my briefly explain what is it all about.In my program, I want to wait for user input, but at the same time, I want...
分类:
其他好文 时间:
2014-10-17 01:19:53
阅读次数:
434
LABjs (Loading And Blocking JavaScript) is an open-source (MIT license) project supported byGetify Solutions. The core purpose of LABjs is to be an al...
分类:
Web程序 时间:
2014-10-14 16:34:08
阅读次数:
258
Source:http://www.samdmarshall.com/blog/blocking_code_injection_on_ios_and_os_x.htmlYesterday I posted (twitter) a set of linker flags that can be set...
分类:
移动开发 时间:
2014-10-09 15:26:23
阅读次数:
239
/***************************************************/ Blocking and Nonblocking circuit and Simulation/ Using level sensitive event/ Programing by seon...
分类:
其他好文 时间:
2014-10-02 23:26:54
阅读次数:
292
原文:5. SQL Server数据库性能监控 - 当前请求对于在线运行的系统,当前数据库性能监控,通常监视以下几点:
(1) 是否有阻塞 (Blocking);
(2) 是否有等待 (Waiting),阻塞就是锁 (Lock) 等待;
(3) 是否运行时间过长(Long running);
(4)...
分类:
数据库 时间:
2014-09-21 22:16:21
阅读次数:
314
参考资料:http://erlangcentral.org/wiki/index.php/Building_a_Non-blocking_TCP_server_using_OTP_principles服务器设计tcp_server_app下的根监控树使用one_for_one重启策略。两个子树应用,...
分类:
其他好文 时间:
2014-09-17 01:01:01
阅读次数:
418
RequireJS由James Burke创建,他也是AMD规范的创始人。RequireJS会让你以不同于往常的方式去写JavaScript。你将不再使用script标签在HTML中引入JS文件,以及不用通过script标签顺序去管理依赖关系。当然也不会有阻塞(blocking)的情况发生。好,以一...
分类:
Web程序 时间:
2014-09-10 19:28:00
阅读次数:
326