ChinaUnix.net
相关文章推荐:

leah dizon thread

POSIX thread 一 概述       Pthread是一套通用的线程库, 它广泛的被各种Unix所支持, 是由POSIX提出的. 因此, 它具有很好的可移植性.  例1:     /**/     #include pthread.h>     void *pp(void *arg)     {         while (1) { ...

by Arthursky - BSD文档中心 - 2009-04-14 09:12:58 阅读(1426) 回复(0)

相关讨论

结构就是起两个线程 一个做server 一个做client 通过本地的8888的端口 #include thread.h> #include #include #include #include #include #include #include #include #include #include volatile int RecvFD = 0; volatile int SendFD = 0; volatile int RecvSD = 0; volatile int ...

by senic - C/C++ - 2008-09-08 10:11:03 阅读(1899) 回复(2)

有人在windows下用过这个模块吗?为什么用threds模块可以实现多线程,但使用use thread;就总是报错!下面是用thread::Pool模块时报的错: Undefined subroutine &threads::new call at C:/Perl/site/lib/thread/Pool.pl line 110 我也单独试了,用thread模块,启动不了多线程!麻烦大家给分析一下!下面是thread模块的一个小例子,大家看看哪里错了! #!c:\perl\bin\perl -w use thread; my @threads; my @info; $info[0]="1";...

by qiqi562877 - Perl - 2011-02-08 02:37:25 阅读(3487) 回复(6)

贴子已过期 [ 本帖最后由 polo1 于 2007-5-3 19:27 编辑 ]

by polo1 - PHP - 2007-05-03 12:57:24 阅读(1267) 回复(1)

#ifdef HAVE_CONFIG_H #include ; #endif #include ; #include ; #includethread.h>; struct student { char name; int num; } void hello(void*arg) { struct student *student2; student2=(struct student *)arg; (*student2).name; pthread_exit(0); } main() { pthread_t tid; struct student*student1; (*student1).name='h'; (*student1).num=2; ...

by lrh_0_2000 - C/C++ - 2005-09-12 19:36:39 阅读(1139) 回复(6)

this thread is deleted

by ltcstyle - 服务器应用 - 2004-12-01 07:51:25 阅读(652) 回复(0)

x=10; thread T1 thread T2 thread T3 down(s); down(s); x=x+1; x=x*2; x=x/2; up(s); up(s); 执行后会有几种结果. 我只知道几种顺序,不知道全部. 求教!

by jerryzzh - C/C++ - 2003-03-24 05:00:45 阅读(678) 回复(0)

各位大虾,本人现在对这两个概念还不是很清楚(从最根本上),打个比方:一台计算机现在在同时运行这写字板、IE两个程序,那么进程是什么意思呢?这台计算机在运行着几个进程? 如果一台计算机只运行着写字板程序,但是一边写、一边检查拼写正确与否,那么这个程序中又运行几个线程呢?

by greatcity - Solaris - 2003-03-06 04:05:20 阅读(852) 回复(4)