Skip to content

代码错误 #296

@JohnZhouCoder

Description

@JohnZhouCoder

1.block_queue.h中pop函数调用的timewait不在while循环中,可能会出现线程虚假唤醒的现象,应该在while(m_size<=0)循环中调用timewait函数
2.pop函数中的时间处理也有问题
屏幕截图 2024-10-18 171136
修改后的代码如下
屏幕截图 2024-10-18 173207

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