当前位置:网站首页>Libevent custom event (asynchronous)
Libevent custom event (asynchronous)
2022-07-26 07:47:00 【Monolithic guy】
Customize asynchronous events
- Create an event
struct event *ev = event_new(base, -1, EV_PERSIST, event_cb, NULL);
event_add(ev, NULL);
- Callback function
static void event_cb(int sock, short which, void *arg)
{
printf("%s\r\n",__func__);
}
- Trigger
event_active(ev , EV_SIGNAL, 0);
explain
- After triggering , Will not sync immediately The callback , Will be in libevent Call callback after loop ( asynchronous ).
边栏推荐
- Establishment and use of openstack cloud platform
- Abnormal (2)
- Quantitative perception training in tensorflow2.x and x86 end evaluation of tflite
- KDD2022 | 揭秘快手短视频推荐Re-ranking之谜,相关推荐新SOTA
- 模型剪枝三:Learning Structured Sparsity in Deep Neural Networks
- Wrong Addition
- Basic knowledge of convolutional neural network
- Lnmp+wordpress to quickly build a personal website
- Command line execution and test report generation of JMeter performance test
- QT listview add controls and pictures
猜你喜欢

WCF introductory tutorial II

【uniapp】多种支付方式封装

【推荐系统经典论文(十)】阿里SDM模型

深度学习模型部署

The analysis, solution and development of the problem of router dropping frequently

NLP natural language processing - Introduction to machine learning and natural language processing (3)

Vscode cannot start the problem solving idea

机器学习相关比赛网站

Sort: merge sort and quick sort

Wrong Addition
随机推荐
:app:checkDebugAarMetadata 2 issues were found when checking AAR metadata: 2 issues were found when
给项目日志加上traceid
Leetcode sword finger offer special (I) integer
How to close the high-level port
Hcip--- MPLS detailed explanation and BGP route filtering
Abnormal (2)
动态性能视图概述
MMOE multi-objective modeling
以太网交换安全
Use of JMeter performance test to store response content to file listener
Taishan Office Technology Lecture: how to calculate page blank (margin)
Learning Efficient Convolutional Networks Through Network Slimming
博途PLC一阶滞后系统传递函数阶跃响应输出仿真(SCL)
ShardingSphere数据分片
1. MySQL Architecture [MySQL advanced]
什么是消息订阅和发布?
Wrong Addition
[daily question 1] 919. Complete binary tree inserter
Next item recommendations in short sessions
MMOE多目标建模