![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
多线程/网络编程
born1985man
这个作者很懒,什么都没留下…
展开
-
blp 4th edition-Chapter 12-Posix threads
创建线程int pthread_create(pthread_t *thread,pthread_attr_t *attr,void *(*start_routine)(void *),void *arg);return 0 on success,an error number if anything goes wrong结束线程void pthread_exit(void * r原创 2009-10-09 09:43:00 · 236 阅读 · 0 评论 -
blp 4th edition-Chapter 13-Inter Process Communication:Pipes
Pipe:connecting a data flow from one process to another进程管道:Process PipesFILE * popen(const char command,const char *open_mode);command:the name of the program to runopen_mode:must be "r" or原创 2009-10-09 10:51:00 · 297 阅读 · 0 评论 -
blp 4th edition-Chapter 14:Semaphores,Shared Memory,and Message Queues.
Semaphore: for managing access to resourcesShared memory:for highly efficient data sharing between programsMessaging:for an easy way of passing data between programs 1.Semaphores一般来说一个thread原创 2009-10-10 20:29:00 · 359 阅读 · 0 评论 -
blp 4th edition-Chapter 11-Processes and Signals
Starting New Processint system(const char * string);等同于sh -c string 用exec函数族Replacing a Process Imageexec函数族replaces the current process with a new process specified by the path or file原创 2009-10-10 09:23:00 · 179 阅读 · 0 评论 -
Linux下通用线程池的创建与使用
Linux下通用线程池的创建与使用本文给出了一个通用的线程池框架,该框架将与线程执行相关的任务进行了高层次的抽象,使之与具体的执行任务无关。另外该线程池具有动态伸缩性,它能根据执行任务的轻重自动调整线程池中线程的数量。文章的最后,我们给出一个简单示例程序,通过该示例程序,我们会发现,通过该线程池框架执行多线程任务是多么的简单。 为转载 2009-10-16 17:11:00 · 555 阅读 · 0 评论 -
Linux下调用pthread库实现简单线程池
#include #include #include #include #include #include void * routine(void * arg);int pool_add_job(void *(*process)(void * arg),void *arg);int pool_init(unsigned int thread_num);int p原创 2009-10-15 21:47:00 · 2024 阅读 · 2 评论 -
TCP/IP illustrated in figures
TCP/IP ilustated in figures原创 2009-10-19 16:29:00 · 288 阅读 · 0 评论