当前位置: 首页 > ops >正文

【FileZilla】Client端的线程模型 (一)

CMainFrame构造---》CFileZillaEngineContex构造--》引起其成员变量lmpl构造--》引起fz::event_loop的构造,其中创建了两个线程(指针) task_和 timer_task_。

// In event_loop.cpp
event_loop::event_loop(thread_pool & pool): sync_(false)
{task_ = std::make_unique<async_task>(pool.spawn([this] { entry(); }));timer_task_ = std::make_unique<async_task>(pool.spawn([this] { timer_entry(); }));
}//In Mainfrm.h
class CMainFrame final : public wxNavigationEnabled<wxFrame>, public COptionChangeEventHandler
#if FZ_MANUALUPDATECHECK, protected CUpdateHandler
#endif
{
......CFileZillaEngineContext m_engineContext;
......
}//In engine_context.h
class FZC_PUBLIC_SYMBOL CFileZillaEngineContext final
{
......class Impl;std::unique_ptr<Impl> impl_;
......
}class CFileZillaEngineContext::Impl final
{
public:Impl(COptionsBase& options): options_(options), rate_limit_mgr_(loop_), tlsSystemTrustStore_(pool_){directory_cache_.SetTtl(fz::duration::from_seconds(options.get_int(OPTION_CACHE_TTL)));rate_limit_mgr_.add(&rate_limiter_);}~Impl(){}COptionsBase& options_;fz::thread_pool pool_;fz::event_loop loop_{pool_};// !!!!!!fz::rate_limit_manager rate_limit_mgr_;fz::rate_limiter rate_limiter_;option_change_handler option_change_handler_{options_, loop_, rate_limit_mgr_, rate_limiter_};CDirectoryCache directory_cache_;CPathCache path_cache_;OpLockManager opLockManager_;fz::tls_system_trust_store tlsSystemTrustStore_;activity_logger activity_logger_;
};

目前每次打开FileZilla就是四个线程,一个主线程及timer_entry()、timer_entry()和thread_entry()。

未完待续......

http://www.xdnf.cn/news/6370.html

相关文章:

  • Linux的进程管理和用户管理
  • 西门子S7-1200 MC卡使用方法及故障现象分析
  • R S的EMI接收机面板
  • 阿里开源通义万相 Wan2.1-VACE,开启视频创作新时代
  • P1303 A*B Problem
  • 山东大学计算机图形学期末复习7——CG11上
  • UDP 多点通信
  • 各编程语言对正则表达式标准的支持对比
  • 【Android】Android 实现一个依赖注入的注解
  • 碰一碰发视频源码搭建定制化开发,支持OEM
  • vue实现导出echarts图片和table表格
  • 用Python代码绘制动态3D爱心效果
  • 算法图表总结:查找、排序与递归(含 Mermaid 图示)
  • 《Navicat之外的新选择:实测支持国产数据库的SQLynx核心功能解析》
  • 人体肢体渲染-一步几个脚印从头设计数字生命——仙盟创梦IDE
  • C++ 基础知识点
  • 【软件工程】机器学习多缺陷定位技术分析
  • 关于NLP自然语言处理的简单总结
  • 【高频面试题】LRU缓存
  • PyTorch中.item()函数:提取单元素张量值
  • 2025认证杯数学建模A题思路+代码+模型:小行星轨迹预测
  • 机器学习 --- KNN算法
  • 基于大模型预测胃穿孔预测与围手术期管理系统技术方案
  • coze从入门到入土:excel表格批量导入数据库工作流制作【解决节点使用上限】 + API接口上传文件和用户需求
  • 11.软考高项(信息系统项目管理师)-干系人管理
  • 【hot100-动态规划-300.最长递增子序列】
  • 填报表之自动计算
  • QT6 源(101)阅读与注释 QPlainTextEdit,其继承于QAbstractScrollArea,属性学习与测试
  • 电脑桌面便签哪个好?2025年电脑免费用的便签软件推荐
  • 知识图谱系列(2):知识图谱的技术架构与组成要素