yanyiwu / limonp

C++ headers(hpp) library with Python style.
MIT License
129 stars 44 forks source link

关于 BoundedBlockingQueue 的加锁操作。 #16

Closed daghlny closed 1 month ago

daghlny commented 6 years ago

因为都是中国人,我就直接打中文了。。。 BoundedBlockingQueue 有 Push 和 Pop 两个操作,这两个函数刚开始的时候都会锁住 mutex 成员变量,那么如果此时队列是 Full 的,用户 Push 不进去数据,同时其他用户 Pop 时也因为获取不了 mutex 而阻塞,那么各个用户(线程)都陷入死锁了吧? 可能有些我没考虑到的因素,请指点。。

github-actions[bot] commented 2 months ago

This issue has not been updated for over a year and will be marked as stale. If the issue still exists, please comment or update the issue, otherwise it will be closed after 7 days.

github-actions[bot] commented 1 month ago

This issue has been automatically closed due to inactivity. If the issue still exists, please reopen it.