Skip to content

blockDeque的一些疑问 #118

Description

@Yuan-GG

1.双端队列哪里有体现吗,异步写log不应该得按照日志数据的顺序来的吗?
2.为什么pop跟push函数中,pop的while要判断队列是否关闭从而返回false,但是push中却没有这个判断呢。我的理解是既然是异步了,就得做好丢失数据的可能(小白不知道有没有什么其他办法可以解决),那push也应该判断是否关闭了,不然是不是我日志系统关闭后还能继续push但是不能pop了,那不是没意义了(写入缓冲区但是没有写到文件中)
image
image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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