Closed lzle closed 1 year ago
@lzle Thanks for your contribution! we'd better add an option to enable it, and disable it by default, to keep backward compability, since the old behaviour could be used in log phase, there is not yield support, but semaphore need yield, can not be used in log phase safely.
@doujiang24 ok, thanks for the suggestion, I'll use option to keep backward compability.
@doujiang24 I adopted your suggestion and added the wait option to the code, please review it and give new suggestions
@doujiang24 The code has been modified, please give your valuable comments again, thank you!
@doujiang24 pease review again.😄
oh, we need some tests to cover this new behaviour.
great thanks!!
@doujiang24 I have added some test cases
@lzle Thanks!
When the producer.add function is executed, if max_buffering is full, you can use semaphore to wait instead of returning an "buffer overflow" directly. When the producer.add function is executed, continue to add to max_buffering