04 2016 档案

摘要:http://blog.csdn.net/hittata/article/details/42387297 阅读全文
posted @ 2016-04-20 18:05 jimshi 阅读(157) 评论(0) 推荐(0)
摘要:http://www.oschina.net/translate/less-is-exponentially-more 阅读全文
posted @ 2016-04-20 18:02 jimshi 阅读(197) 评论(0) 推荐(0)
摘要:1.在高并发队列任务分发的场景中Ring Buffer比Channel的性能更好 2.defer功能不是静态编译时提供的,而是运行时提供的,所以使用defer会产生一些额外的性能开销(了解就好,该用还是得用) 1.在高并发队列任务分发的场景中Ring Buffer比Channel的性能更好 2.de 阅读全文
posted @ 2016-04-20 18:01 jimshi 阅读(593) 评论(0) 推荐(0)
摘要:http://www.cppblog.com/sailing/articles/161659.html 作者:斑鸠更新时间:2009/01/04编译器版本:Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.21022.08 fo 阅读全文
posted @ 2016-04-15 17:00 jimshi 阅读(298) 评论(0) 推荐(0)
摘要:http://blog.sina.com.cn/s/blog_54f82cc201011op1.html ppc_85xx-gcc -shared -fPIC liberr.c -o liberr.so-fPIC 作用于编译阶段,告诉编译器产生与位置无关代码(Position-Independent 阅读全文
posted @ 2016-04-14 09:31 jimshi 阅读(1159) 评论(0) 推荐(0)
摘要:http://blog.csdn.net/luo6620378xu/article/details/8521940 近日需要将线程池封装成C++类,类名为Threadpool。在类的成员函数exec_task中调用pthread_create去启动线程执行例程thread_rounter。编译之后报 阅读全文
posted @ 2016-04-13 23:16 jimshi 阅读(7921) 评论(0) 推荐(1)
摘要:http://bbs.csdn.net/topics/390800051 代码如下,abstract.h文件 C/C++ code ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 template<typename T> class abstract { publi 阅读全文
posted @ 2016-04-13 17:49 jimshi 阅读(1351) 评论(0) 推荐(0)
摘要:http://blog.csdn.net/xiajun07061225/article/details/9250579 什么是epoll epoll是什么?按照man手册的说法:是为处理大批量句柄而作了改进的poll。当然,这不是2.6内核才有的,它是在2.5.44内核中被引进的(epoll(4) 阅读全文
posted @ 2016-04-13 14:46 jimshi 阅读(647) 评论(0) 推荐(0)
摘要:http://www.kuqin.com/shuoit/20140522/340091.html 一、基本原理 有时候我们需要实现一个公共的模块,需要对多个其他的模块提供服务,最常用的方式就是实现一个Socket Server,接受客户的请求,并返回给客户结果。 这经常涉及到如果管理多个连接及如何多 阅读全文
posted @ 2016-04-08 22:43 jimshi 阅读(182) 评论(0) 推荐(0)
摘要:http://my.oschina.net/u/917596/blog/161077 1.Redis的事件模型库 大家到网上Google“Redis libevent”就可以搜到Redis为什么没有选择libevent以及libev为其事件模型库,而是自己写了一个事件模型。 从代码中可以看到它主要支 阅读全文
posted @ 2016-04-08 18:14 jimshi 阅读(5652) 评论(0) 推荐(0)
摘要:http://my.oschina.net/iuranus/blog/330397 文件句柄(摘抄的一些概念,帮助理解): 句柄是WONDOWS用来标识被应用程序所建立或使用的对象的唯一整数,WINDOWS使用各种各样的句柄标识诸如应用程序实例,窗口,控制,位图,GDI对象等等。WINDOWS句柄有 阅读全文
posted @ 2016-04-08 15:27 jimshi 阅读(1339) 评论(0) 推荐(0)