
多线程技术
文章平均质量分 82
stalendp
程序员一枚目前专注手机游戏Analysis gives way to art and science yields to magic
展开
-
多线程笔记
1. thread的创建 #include void* thread_function(void *arg) { .... return NULL; } pthread_t mythread; if ( pthread_create( &mythread, NULL, thread_function, NULL/*args*/) ) { printf("error原创 2013-07-05 16:45:02 · 2706 阅读 · 1 评论 -
多线程笔记2
以前学习过Java的多线程设计,出于对java多线程设计的熟悉,我把pthread的多线程方法按照java的习惯分装了一下,并写了几个例子,分享一下。 // ThreadHelper.h #ifndef threadTest_ThreadHelper_h #define threadTest_ThreadHelper_h #include #include #include voi原创 2013-07-12 12:46:36 · 2693 阅读 · 2 评论