⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 event_msgqueue.h

📁 spserver 是一个实现了半同步/半异步(Half-Sync/Half-Async)和领导者/追随者(Leader/Follower) 模式的服务器框架
💻 H
字号:
/* * event_msgqueue.h * * Libevent threaded message passing primitives header * * Andrew Danforth <acd@weirdness.net>, October 2006 * * Copyright (c) Andrew Danforth, 2006 * */#ifndef _EVENT_MSGQUEUE_H_#define _EVENT_MSGQUEUE_H_#include <event.h>#include <pthread.h>#ifdef __cplusplusextern "C" {#endifstruct event_msgqueue;struct event_msgqueue *msgqueue_new(struct event_base *, unsigned int, void (*)(void *, void *), void *);int msgqueue_push(struct event_msgqueue *, void *);unsigned int msgqueue_length(struct event_msgqueue *);void msgqueue_destroy(struct event_msgqueue*);#ifdef __cplusplus}#endif#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -