程序说明
:
多线程并发,在接收到请求时,将每个请求创建个线程来执行,原线程
(
即主线程
)
继续
listen.
在创建多线程时的主要问题是传入线程参数。
NAME
pthread_create - create a new thread
SYNOPSIS
#include <pthread.h>
int pthread_create(pthread_t * thread, pthread_attr_t * attr, void * (*start_routine)(void *), void * arg);
/***************************************************************************
* author: denny wqf363@hotmail.com 2006
* desc: 多线程并发
* 座友铭:凡是程序当前不需要的,都是垃圾,80%的时间做20%的事情。(程序的效率)
* *
***************************************************************************/
#include <sys/types.h>
#includ