本文为本人原创,首发到炼数成金http://f.dataguru.cn/thread-138720-1-1.html。情况是这样的,我没有一个非常强劲的电脑来搞出一个性能非常NB的服务器集群,相信很多人也跟我差不多,所以现在把我的低配置集群经验拿出来写一下好了。我的配备:1)五六年前的赛扬单核处理器...
分类:
其他好文 时间:
2014-07-19 20:07:37
阅读次数:
294
#include
#include
using namespace std;
void hello()
{
cout<<"hello kitty"<<endl;
}
int main()
{
std::thread t(hello);
t.join();
return 0;
}...
分类:
编程语言 时间:
2014-07-18 23:03:18
阅读次数:
343
不是所有的OutofMemory exception都是内存问题。。。小心系统资源陷阱...
分类:
Web程序 时间:
2014-07-18 22:17:03
阅读次数:
451
Thread.currentThread().getStackTrace()[1]和new Exception().getStackTrace()[1]的战争...
分类:
其他好文 时间:
2014-07-18 22:15:59
阅读次数:
265
转载自:http://c4fun.cn/blog/2014/05/06/python-threading/python中关于多线程的操作可以使用thread和threading模块来实现,其中thread模块在Py3中已经改名为_thread,不再推荐使用。而threading模块是在thread之...
分类:
编程语言 时间:
2014-07-18 20:16:30
阅读次数:
310
#includepthread_t pthread_self(void)功能:获取调用线程的thread identifer例如:thread_id.c运行结果:清除:线程终止有两种情况:正常终止和非正常终止当某段代码可能出现不可预料的终止时,可以用pthread_cleanup_push和pthr...
分类:
编程语言 时间:
2014-07-18 09:19:15
阅读次数:
269
firefly-gevent 是firefly的gevent版本。相比现在的firefly版本使用的twisted,gevent更加的精简。gevent就是一个基于coroutine的python网络开发框架。协程是一种并发模型,但不同于thread和callback,它的所有task都是可以在一个...
分类:
其他好文 时间:
2014-07-17 23:35:56
阅读次数:
358
在后台下载图片,下载完成后更新UI是一个很常见的需求。在没有AsyncTask类之前,我们需要写许多thread和Handler的代码去实现这个功能,有了AsyncTask,一切变得简单了。下面摘抄谷歌官方介绍:AsyncTask is designed to be a helper class a...
分类:
移动开发 时间:
2014-07-17 22:37:48
阅读次数:
308
kali live 安装到U盘http://www.backtrack.org.cn/thread-17197-1-1.html用Live U盘安装Kali Linuxhttp://cn.docs.kali.org/installing-kali-linux-cn/%E7%94%A8live-u%E...
分类:
其他好文 时间:
2014-07-17 21:35:06
阅读次数:
244
TCMalloc是什么?TCMalloc(Thread-CachingMalloc)与标准glibc库的malloc实现一样的功能,但是TCMalloc在效率和速度效率都比标准malloc高很多。TCMalloc是google-perftools工具中的一个(gperftools四个工具分别是:TCMalloc、heap-checker、heap-profiler和cpu-profiler),这..
分类:
数据库 时间:
2014-07-17 15:34:03
阅读次数:
421