了解一下boost的fiber

作者:

在

fiber是纤程,用户级纤程,在用户层提供调度管理器,可以在系统线程上切换纤程,它主要的好处:

  • 切换非常快,按照boost的数据,快100倍[1];
  • 纤程访问父线程的数据不需要加锁,因为不具备竞争;
  • 基于完全同步的写法来实现的fiber阻塞和切换;

引用

  1. https://www.boost.org/doc/libs/1_83_0/libs/fiber/doc/html/fiber/performance.html
  2. https://blog.csdn.net/hezhanran/article/details/110792367
  3. https://agraphicsguynotes.com/posts/fiber_in_cpp_understanding_the_basics/

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注