Linux
五十块
这个作者很懒,什么都没留下…
展开
-
Ubuntu epoll使用指北
本文记录Ubuntu下epoll的使用注意事项。epoll的ET模式。(1)当检测到可读事件后,需要读完buffer中的数据。(2)阻塞读、写会造成饥饿现象,所以当使用ET模式时要设置FD为非阻塞模式The suggested way to use epoll as an edge-triggered (EPOLLET) interface is as follows:i ...翻译 2019-04-29 17:25:23 · 812 阅读 · 0 评论 -
Ubuntu pthread使用指北
pthread_create()#include <pthread.h>int pthread_create(pthread_t *restrict thread, const pthread_attr_t *restrict attr, void *(*start_routine)(void*), void *restrict arg);(1)线程一建立就执行start_r...翻译 2019-04-29 21:10:21 · 1064 阅读 · 0 评论