阿里云
>
Redis
>
Redis官方文档事件
Redis官方文档事件
《
Redis官方文档
》
Redis事件
库
原文链接 译者:cndpzc
Redis
实现了自己的
事件
库,代码在ae.c中。想要理解
Redis事件
库的工作原理,最好的方法就是去理解
Redis
如何使用它。
事件
循环初始化
redis
.c中的initServer函数初始化了
redis
Server结构体变量的众多成员,其中一个就是...
《
Redis官方文档
》
Redis事件
库
Redis
实现了自己的
事件
库,代码在ae.c中。想要理解
Redis事件
库的工作原理,最好的方法就是去理解
Redis
如何使用它。
事件
循环初始化
redis
.c中的initServer函数初始化了
redis
Server结构体变量的众多成员,其中一个就是
Redis事件
循环(event ...
《
Redis官方文档
》
事件
库
究竟为什么需要一个
事件
库呢?让我们通过下面一系列问答来了解为什么。问:你希望网络服务器持续不断地做什么
事
?答:监听端口上进来的连接请求并接收它们。问:调用套接字的Accept方法产生一个描述符,我们用这个描述符做什么?答:保存这...
1
Redis更多"事件"相关
.
Redis支持事件
您可能感兴趣
.
Redis安装
.
Redis学习
.
Redis源码
.
Redis分布式锁
.
Redis笔记
.
整合Redis
.
Redis数据结构
.
Redis数据类型
{"moduleinfo":{"card_count":[{"count_phone":1,"count":1}],"search_count":[{"count_phone":9,"count":9}]},"card":[{"des":"兼容Redis协议标准的、提供持久化的内存数据库服务,基于高性价比的单节点架构、高可靠双机热备架构及可无缝扩展的集群架构,满足纯缓存业务、高读写性能场景及容量需弹性变配的业务需求。","link1":"https://www.aliyun.com/product/kvstore","link":"https://www.aliyun.com/product/kvstore","icon":"https://img.alicdn.com/tfs/TB170KSRVXXXXc0XpXXXXXXXXXX-114-114.png","btn2":"了解价格","tip":"产品0元免费试用,
立即领取。
云数据库Redis产品升级,全球多活,冷热分离混合存储,多线程性能增强,
观看发布会
","btn1":"立即开通","link2":"https://www.aliyun.com/price/product?spm=5176.54432.728894.price1.14db28f5oLfCJS#/kvstore/detail","title":"云数据库 Redis 版"}],"search":[{"txt":"免费套餐","link":"https://free.aliyun.com"},{"txt":"云数据库MySQL","link":"https://www.aliyun.com/product/rds/mysql?spm=5176.8142029.388261.348.54216d3edqlhkH"},{"txt":"云数据库MongoDB","link":"https://www.aliyun.com/product/mongodb?spm=5176.8142029.388261.351.54216d3edqlhkH"},{"txt":"云数据库HBase","link":"https://www.aliyun.com/product/hbase?spm=5176.8142029.388261.357.54216d3edqlhkH"},{"txt":"云数据库POLARDB","link":"https://www.aliyun.com/product/polardb?spm=5176.8142029.388261.352.54216d3edqlhkH"},{"txt":"全球多活","link":"https://yq.aliyun.com/articles/630277"},{"txt":"混合存储","link":"https://yq.aliyun.com/articles/582418"},{"txt":"多线程","link":"https://yq.aliyun.com/articles/629424"},{"txt":"产品技术解析","link":"https://yq.aliyun.com/articles/635664"}],"countinfo":{"search":{"length_pc":0,"length":0},"card":{"length_pc":0,"length":0}},"simplifiedDisplay":"newEdition","newCard":[{"link":"https://img.alicdn.com/tfs/TB1KM.qIeH2gK0jSZJnXXaT1FXa-1740-328.png","icon":"redis","contentLink":"https://www.aliyun.com/product/kvstore","title":"云数据库 Redis 版","des":"兼容Redis协议标准的、提供持久化的内存数据库服务,基于高性价比的单节点架构、高可靠双机热备架构及可无缝扩展的集群架构,满足纯缓存业务、高读写性能场景及容量需弹性变配的业务需求。","btn1":"了解详情","link1":"https://www.aliyun.com/product/kvstore","btn2":"管理控制台","link2":"https://kvstorenext.console.aliyun.com/?spm=5176.54432.1393010.3.779f1cf2SyYDaC#/home/cn-hangzhou","btn3":"在线咨询","link3":"https://www.aliyun.com/core/online-consult?spm=5176.8789780.7y9jhqsfz.115.47ea55caeL2Mfu&from=OVtXEBmlH8","infoGroup":[{"infoName":"最新活动","infoContent":{"firstContentName":"Redis 19.9元/年","firstContentLink":"https://common-buy.aliyun.com/?commodityCode=prepaid_kvstore&request=%7B%22ord_time%22:%221:Year%22,%22order_num%22:1,%22kvstore_region_no%22:%22cn-hangzhou%22,%22kvstore_zonetype%22:%22singlezone%22,%22kvstore_iz%22:%22cn-hangzhou-e%22,%22kvstore_web_type%22:%221%22,%22EditionType%22:%22Community%22,%22kvstore_engineversion_type%22:%225.0%22,%22kvstore_achitecture_type%22:%22standard%22,%22ShardNum%22:%221%22,%22kvstore_node_type%22:%22double%22,%22kvstore_instance_class%22:%22redis.master.micro.default%22,%22kvstore_password%22:%22later%22%7D&activityId=1310561505628548","lastContentName":"数据库专场优惠","lastContentLink":"https://www.aliyun.com/database/dbfirstbuy"}},{"infoName":"快速入门","infoContent":{"firstContentLink":"https://help.aliyun.com/product/26340.html","firstContentName":"帮助文档","lastContentName":"快速入门","lastContentLink":"https://help.aliyun.com/document_detail/54592.html"}},{"infoName":"最佳实践","infoContent":{"firstContentName":"电商行业业务上云","firstContentLink":"https://bp.aliyun.com/detail/8","lastContentName":"数据库客户案例合集","lastContentLink":"https://www.aliyun.com/database/case"}},{"infoName":"产品推荐","infoContent":{"firstContentName":"云数据库PolarDB","firstContentLink":"https://www.aliyun.com/product/polardb","lastContentName":"云原生数据仓库MySQL","lastContentLink":"https://www.aliyun.com/product/ads"}}],"iconImg":"https://docs-aliyun.cn-hangzhou.oss.aliyun-inc.com/assets/attach/109395/cn_zh/1621579865639/Redis.svg?spm=a2c4g.11186623.2.6.2b04254bUmrUWr&file=Redis.svg","ifIcon":"icon"}]}
{"$env":{"JSON":{}},"$page":{"env":"production"},"$context":{"moduleinfo":{"card_count":[{"count_phone":1,"count":1}],"search_count":[{"count_phone":9,"count":9}]},"card":[{"des":"兼容Redis协议标准的、提供持久化的内存数据库服务,基于高性价比的单节点架构、高可靠双机热备架构及可无缝扩展的集群架构,满足纯缓存业务、高读写性能场景及容量需弹性变配的业务需求。","link1":"https://www.aliyun.com/product/kvstore","link":"https://www.aliyun.com/product/kvstore","icon":"https://img.alicdn.com/tfs/TB170KSRVXXXXc0XpXXXXXXXXXX-114-114.png","btn2":"了解价格","tip":"产品0元免费试用,
立即领取。
云数据库Redis产品升级,全球多活,冷热分离混合存储,多线程性能增强,
观看发布会
","btn1":"立即开通","link2":"https://www.aliyun.com/price/product?spm=5176.54432.728894.price1.14db28f5oLfCJS#/kvstore/detail","title":"云数据库 Redis 版"}],"search":[{"txt":"免费套餐","link":"https://free.aliyun.com"},{"txt":"云数据库MySQL","link":"https://www.aliyun.com/product/rds/mysql?spm=5176.8142029.388261.348.54216d3edqlhkH"},{"txt":"云数据库MongoDB","link":"https://www.aliyun.com/product/mongodb?spm=5176.8142029.388261.351.54216d3edqlhkH"},{"txt":"云数据库HBase","link":"https://www.aliyun.com/product/hbase?spm=5176.8142029.388261.357.54216d3edqlhkH"},{"txt":"云数据库POLARDB","link":"https://www.aliyun.com/product/polardb?spm=5176.8142029.388261.352.54216d3edqlhkH"},{"txt":"全球多活","link":"https://yq.aliyun.com/articles/630277"},{"txt":"混合存储","link":"https://yq.aliyun.com/articles/582418"},{"txt":"多线程","link":"https://yq.aliyun.com/articles/629424"},{"txt":"产品技术解析","link":"https://yq.aliyun.com/articles/635664"}],"countinfo":{"search":{"length_pc":0,"length":0},"card":{"length_pc":0,"length":0}},"simplifiedDisplay":"newEdition","newCard":[{"link":"https://img.alicdn.com/tfs/TB1KM.qIeH2gK0jSZJnXXaT1FXa-1740-328.png","icon":"redis","contentLink":"https://www.aliyun.com/product/kvstore","title":"云数据库 Redis 版","des":"兼容Redis协议标准的、提供持久化的内存数据库服务,基于高性价比的单节点架构、高可靠双机热备架构及可无缝扩展的集群架构,满足纯缓存业务、高读写性能场景及容量需弹性变配的业务需求。","btn1":"了解详情","link1":"https://www.aliyun.com/product/kvstore","btn2":"管理控制台","link2":"https://kvstorenext.console.aliyun.com/?spm=5176.54432.1393010.3.779f1cf2SyYDaC#/home/cn-hangzhou","btn3":"在线咨询","link3":"https://www.aliyun.com/core/online-consult?spm=5176.8789780.7y9jhqsfz.115.47ea55caeL2Mfu&from=OVtXEBmlH8","infoGroup":[{"infoName":"最新活动","infoContent":{"firstContentName":"Redis 19.9元/年","firstContentLink":"https://common-buy.aliyun.com/?commodityCode=prepaid_kvstore&request=%7B%22ord_time%22:%221:Year%22,%22order_num%22:1,%22kvstore_region_no%22:%22cn-hangzhou%22,%22kvstore_zonetype%22:%22singlezone%22,%22kvstore_iz%22:%22cn-hangzhou-e%22,%22kvstore_web_type%22:%221%22,%22EditionType%22:%22Community%22,%22kvstore_engineversion_type%22:%225.0%22,%22kvstore_achitecture_type%22:%22standard%22,%22ShardNum%22:%221%22,%22kvstore_node_type%22:%22double%22,%22kvstore_instance_class%22:%22redis.master.micro.default%22,%22kvstore_password%22:%22later%22%7D&activityId=1310561505628548","lastContentName":"数据库专场优惠","lastContentLink":"https://www.aliyun.com/database/dbfirstbuy"}},{"infoName":"快速入门","infoContent":{"firstContentLink":"https://help.aliyun.com/product/26340.html","firstContentName":"帮助文档","lastContentName":"快速入门","lastContentLink":"https://help.aliyun.com/document_detail/54592.html"}},{"infoName":"最佳实践","infoContent":{"firstContentName":"电商行业业务上云","firstContentLink":"https://bp.aliyun.com/detail/8","lastContentName":"数据库客户案例合集","lastContentLink":"https://www.aliyun.com/database/case"}},{"infoName":"产品推荐","infoContent":{"firstContentName":"云数据库PolarDB","firstContentLink":"https://www.aliyun.com/product/polardb","lastContentName":"云原生数据仓库MySQL","lastContentLink":"https://www.aliyun.com/product/ads"}}],"iconImg":"https://docs-aliyun.cn-hangzhou.oss.aliyun-inc.com/assets/attach/109395/cn_zh/1621579865639/Redis.svg?spm=a2c4g.11186623.2.6.2b04254bUmrUWr&file=Redis.svg","ifIcon":"icon"}]}}
云数据库 Redis 版
兼容Redis协议标准的、提供持久化的内存数据库服务,基于高性价比的单节点架构、高可靠双机热备架构及可无缝扩展的集群架构,满足纯缓存业务、高读写性能场景及容量需弹性变配的业务需求。
了解详情
管理控制台
在线咨询
最新活动
Redis 19.9元/年
数据库专场优惠
快速入门
帮助文档
快速入门
最佳实践
电商行业业务上云
数据库客户案例合集
产品推荐
云数据库PolarDB
云原生数据仓库MySQL
{"moduleinfo":{"card_count":[{"count_phone":1,"count":1}],"search_count":[{"count_phone":9,"count":9}]},"card":[{"des":"兼容Redis协议标准的、提供持久化的内存数据库服务,基于高性价比的单节点架构、高可靠双机热备架构及可无缝扩展的集群架构,满足纯缓存业务、高读写性能场景及容量需弹性变配的业务需求。","link1":"https://www.aliyun.com/product/kvstore","link":"https://www.aliyun.com/product/kvstore","icon":"https://img.alicdn.com/tfs/TB170KSRVXXXXc0XpXXXXXXXXXX-114-114.png","btn2":"了解价格","tip":"产品0元免费试用,
立即领取。
云数据库Redis产品升级,全球多活,冷热分离混合存储,多线程性能增强,
观看发布会
","btn1":"立即开通","link2":"https://www.aliyun.com/price/product?spm=5176.54432.728894.price1.14db28f5oLfCJS#/kvstore/detail","title":"云数据库 Redis 版"}],"search":[{"txt":"免费套餐","link":"https://free.aliyun.com"},{"txt":"云数据库MySQL","link":"https://www.aliyun.com/product/rds/mysql?spm=5176.8142029.388261.348.54216d3edqlhkH"},{"txt":"云数据库MongoDB","link":"https://www.aliyun.com/product/mongodb?spm=5176.8142029.388261.351.54216d3edqlhkH"},{"txt":"云数据库HBase","link":"https://www.aliyun.com/product/hbase?spm=5176.8142029.388261.357.54216d3edqlhkH"},{"txt":"云数据库POLARDB","link":"https://www.aliyun.com/product/polardb?spm=5176.8142029.388261.352.54216d3edqlhkH"},{"txt":"全球多活","link":"https://yq.aliyun.com/articles/630277"},{"txt":"混合存储","link":"https://yq.aliyun.com/articles/582418"},{"txt":"多线程","link":"https://yq.aliyun.com/articles/629424"},{"txt":"产品技术解析","link":"https://yq.aliyun.com/articles/635664"}],"countinfo":{"search":{"length_pc":0,"length":0},"card":{"length_pc":0,"length":0}},"simplifiedDisplay":"newEdition","newCard":[{"link":"https://img.alicdn.com/tfs/TB1KM.qIeH2gK0jSZJnXXaT1FXa-1740-328.png","icon":"redis","contentLink":"https://www.aliyun.com/product/kvstore","title":"云数据库 Redis 版","des":"兼容Redis协议标准的、提供持久化的内存数据库服务,基于高性价比的单节点架构、高可靠双机热备架构及可无缝扩展的集群架构,满足纯缓存业务、高读写性能场景及容量需弹性变配的业务需求。","btn1":"了解详情","link1":"https://www.aliyun.com/product/kvstore","btn2":"管理控制台","link2":"https://kvstorenext.console.aliyun.com/?spm=5176.54432.1393010.3.779f1cf2SyYDaC#/home/cn-hangzhou","btn3":"在线咨询","link3":"https://www.aliyun.com/core/online-consult?spm=5176.8789780.7y9jhqsfz.115.47ea55caeL2Mfu&from=OVtXEBmlH8","infoGroup":[{"infoName":"最新活动","infoContent":{"firstContentName":"Redis 19.9元/年","firstContentLink":"https://common-buy.aliyun.com/?commodityCode=prepaid_kvstore&request=%7B%22ord_time%22:%221:Year%22,%22order_num%22:1,%22kvstore_region_no%22:%22cn-hangzhou%22,%22kvstore_zonetype%22:%22singlezone%22,%22kvstore_iz%22:%22cn-hangzhou-e%22,%22kvstore_web_type%22:%221%22,%22EditionType%22:%22Community%22,%22kvstore_engineversion_type%22:%225.0%22,%22kvstore_achitecture_type%22:%22standard%22,%22ShardNum%22:%221%22,%22kvstore_node_type%22:%22double%22,%22kvstore_instance_class%22:%22redis.master.micro.default%22,%22kvstore_password%22:%22later%22%7D&activityId=1310561505628548","lastContentName":"数据库专场优惠","lastContentLink":"https://www.aliyun.com/database/dbfirstbuy"}},{"infoName":"快速入门","infoContent":{"firstContentLink":"https://help.aliyun.com/product/26340.html","firstContentName":"帮助文档","lastContentName":"快速入门","lastContentLink":"https://help.aliyun.com/document_detail/54592.html"}},{"infoName":"最佳实践","infoContent":{"firstContentName":"电商行业业务上云","firstContentLink":"https://bp.aliyun.com/detail/8","lastContentName":"数据库客户案例合集","lastContentLink":"https://www.aliyun.com/database/case"}},{"infoName":"产品推荐","infoContent":{"firstContentName":"云数据库PolarDB","firstContentLink":"https://www.aliyun.com/product/polardb","lastContentName":"云原生数据仓库MySQL","lastContentLink":"https://www.aliyun.com/product/ads"}}],"iconImg":"https://docs-aliyun.cn-hangzhou.oss.aliyun-inc.com/assets/attach/109395/cn_zh/1621579865639/Redis.svg?spm=a2c4g.11186623.2.6.2b04254bUmrUWr&file=Redis.svg","ifIcon":"icon"}]}
{"$env":{"JSON":{}},"$page":{"env":"production"},"$context":{"moduleinfo":{"card_count":[{"count_phone":1,"count":1}],"search_count":[{"count_phone":9,"count":9}]},"card":[{"des":"兼容Redis协议标准的、提供持久化的内存数据库服务,基于高性价比的单节点架构、高可靠双机热备架构及可无缝扩展的集群架构,满足纯缓存业务、高读写性能场景及容量需弹性变配的业务需求。","link1":"https://www.aliyun.com/product/kvstore","link":"https://www.aliyun.com/product/kvstore","icon":"https://img.alicdn.com/tfs/TB170KSRVXXXXc0XpXXXXXXXXXX-114-114.png","btn2":"了解价格","tip":"产品0元免费试用,
立即领取。
云数据库Redis产品升级,全球多活,冷热分离混合存储,多线程性能增强,
观看发布会
","btn1":"立即开通","link2":"https://www.aliyun.com/price/product?spm=5176.54432.728894.price1.14db28f5oLfCJS#/kvstore/detail","title":"云数据库 Redis 版"}],"search":[{"txt":"免费套餐","link":"https://free.aliyun.com"},{"txt":"云数据库MySQL","link":"https://www.aliyun.com/product/rds/mysql?spm=5176.8142029.388261.348.54216d3edqlhkH"},{"txt":"云数据库MongoDB","link":"https://www.aliyun.com/product/mongodb?spm=5176.8142029.388261.351.54216d3edqlhkH"},{"txt":"云数据库HBase","link":"https://www.aliyun.com/product/hbase?spm=5176.8142029.388261.357.54216d3edqlhkH"},{"txt":"云数据库POLARDB","link":"https://www.aliyun.com/product/polardb?spm=5176.8142029.388261.352.54216d3edqlhkH"},{"txt":"全球多活","link":"https://yq.aliyun.com/articles/630277"},{"txt":"混合存储","link":"https://yq.aliyun.com/articles/582418"},{"txt":"多线程","link":"https://yq.aliyun.com/articles/629424"},{"txt":"产品技术解析","link":"https://yq.aliyun.com/articles/635664"}],"countinfo":{"search":{"length_pc":0,"length":0},"card":{"length_pc":0,"length":0}},"simplifiedDisplay":"newEdition","newCard":[{"link":"https://img.alicdn.com/tfs/TB1KM.qIeH2gK0jSZJnXXaT1FXa-1740-328.png","icon":"redis","contentLink":"https://www.aliyun.com/product/kvstore","title":"云数据库 Redis 版","des":"兼容Redis协议标准的、提供持久化的内存数据库服务,基于高性价比的单节点架构、高可靠双机热备架构及可无缝扩展的集群架构,满足纯缓存业务、高读写性能场景及容量需弹性变配的业务需求。","btn1":"了解详情","link1":"https://www.aliyun.com/product/kvstore","btn2":"管理控制台","link2":"https://kvstorenext.console.aliyun.com/?spm=5176.54432.1393010.3.779f1cf2SyYDaC#/home/cn-hangzhou","btn3":"在线咨询","link3":"https://www.aliyun.com/core/online-consult?spm=5176.8789780.7y9jhqsfz.115.47ea55caeL2Mfu&from=OVtXEBmlH8","infoGroup":[{"infoName":"最新活动","infoContent":{"firstContentName":"Redis 19.9元/年","firstContentLink":"https://common-buy.aliyun.com/?commodityCode=prepaid_kvstore&request=%7B%22ord_time%22:%221:Year%22,%22order_num%22:1,%22kvstore_region_no%22:%22cn-hangzhou%22,%22kvstore_zonetype%22:%22singlezone%22,%22kvstore_iz%22:%22cn-hangzhou-e%22,%22kvstore_web_type%22:%221%22,%22EditionType%22:%22Community%22,%22kvstore_engineversion_type%22:%225.0%22,%22kvstore_achitecture_type%22:%22standard%22,%22ShardNum%22:%221%22,%22kvstore_node_type%22:%22double%22,%22kvstore_instance_class%22:%22redis.master.micro.default%22,%22kvstore_password%22:%22later%22%7D&activityId=1310561505628548","lastContentName":"数据库专场优惠","lastContentLink":"https://www.aliyun.com/database/dbfirstbuy"}},{"infoName":"快速入门","infoContent":{"firstContentLink":"https://help.aliyun.com/product/26340.html","firstContentName":"帮助文档","lastContentName":"快速入门","lastContentLink":"https://help.aliyun.com/document_detail/54592.html"}},{"infoName":"最佳实践","infoContent":{"firstContentName":"电商行业业务上云","firstContentLink":"https://bp.aliyun.com/detail/8","lastContentName":"数据库客户案例合集","lastContentLink":"https://www.aliyun.com/database/case"}},{"infoName":"产品推荐","infoContent":{"firstContentName":"云数据库PolarDB","firstContentLink":"https://www.aliyun.com/product/polardb","lastContentName":"云原生数据仓库MySQL","lastContentLink":"https://www.aliyun.com/product/ads"}}],"iconImg":"https://docs-aliyun.cn-hangzhou.oss.aliyun-inc.com/assets/attach/109395/cn_zh/1621579865639/Redis.svg?spm=a2c4g.11186623.2.6.2b04254bUmrUWr&file=Redis.svg","ifIcon":"icon"}]}}
云数据库 Redis 版
兼容Redis协议标准的、提供持久化的内存数据库服务,基于高性价比的单节点架构、高可靠双机热备架构及可无缝扩展的集群架构,满足纯缓存业务、高读写性能场景及容量需弹性变配的业务需求。
了解详情
管理控制台
在线咨询
最新活动
Redis 19.9元/年
数据库专场优惠
快速入门
帮助文档
快速入门
最佳实践
电商行业业务上云
数据库客户案例合集
产品推荐
云数据库PolarDB
云原生数据仓库MySQL