RFoe / coasync

Asynchronous network library that supports coroutines in C++20
https://github.com/RFoe/coasync
MIT License
51 stars 5 forks source link

定长channel内部可以不用std::queue/deque #4

Closed RFoe closed 1 month ago

RFoe commented 2 months ago

https://github.com/RFoe/coasync/blob/a466688370ce4bc5feefc8a55d960de447dfbfde/include/coasync/channel.hpp#L47

用数组模拟环形队列代替std::queue(或许可以写成MPMC无锁容器代替Mutex) 需要对channel::value_type做更多类型约束