当前位置:网站首页>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 ).
边栏推荐
- 0 dynamic programming leetcode1567. Length of the longest subarray with positive product
- Anaconda 中安装 百度飞浆Paddle 深度学习框架 教程
- Basic knowledge of convolutional neural network
- Summarize the common high-frequency interview questions of the software testing post
- Crawler data analysis
- 2021全球机器学习大会演讲稿
- What is bloom filter in redis series?
- Jmeter性能测试之命令行执行和生成测试报告
- 【推荐系统经典论文(十)】阿里SDM模型
- Come across the sea to see you
猜你喜欢
![PostgreSQL UUID fuzzy search UUID string type conversion SQL error [42883] explicit type casts](/img/ba/28afaead68c9ff47d15d5c5395d9ce.png)
PostgreSQL UUID fuzzy search UUID string type conversion SQL error [42883] explicit type casts

table 固定特定行

Lambda and stream

程序环境和预处理

Crawler - > tpimgspider

20220209 create a basic Servlet

Devaxpress.xtraeditors.datanavigator usage

PyTorch

Network trimming: a data driven neuron pruning approach towards efficient deep architectures paper translation / Notes

【每日一题】919. 完全二叉树插入器
随机推荐
Come across the sea to see you
2019 ZTE touyue · model compression scheme
Lambda and stream
Regression analysis code implementation
Meta universe infrastructure: analysis of the advantages of Web 3.0 chain33
Sort: merge sort and quick sort
0 dynamic programming leetcode1567. Length of the longest subarray with positive product
一文掌握mysql数据库审计特点、实现方案及审计插件部署教程
What is message subscription and publishing?
Como automatic test system: build process record
Unity Metaverse(二)、Mixamo & Animator 混合树与动画融合
【每日一题】919. 完全二叉树插入器
如何保证缓存和数据库的双写一致性?
如何关闭高位端口
Polymorphism, final and interface
1.MySQL架构篇【mysql高级】
分布式相关面试题总结
系统架构&微服务
The bigger the project is, the bigger it is. This is how I split it
[classic thesis of recommendation system (10)] Alibaba SDM model