#include<stdio.h> #include<memory.h> #include<pthread.h> int buf[1000000]; int w=0,r=0; //r是读指针,w是写指针 int size=10; //缓冲区大小 pthread_mutex_t lock...【阅读全文】
The libevent API provides a mechanism to execute a callback function when a specific event occurs on a file descriptor or after a timeout has been reached. Furthermore, libevent also support callbacks due to signals or regular timeouts.libevent is meant to replace the event loop found in event d...【阅读全文】