Skip to content

距离工程化还差一个cond #2

@yyzybb537

Description

@yyzybb537

如果队列为空,while (try read); 是一个会把cpu core吃满的操作,在实际工程中适用范围很小。

此处需要一个std::condition_variable来等待,引入condition又会有新的问题,不是使用者直接引入就能解决的,应该还是需要wait-free队列处理好这个事情。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions