pinkman

Results 4 comments of pinkman

Looks like const int* cannot be bind to int* const&

std::vector has no find function, only algorithm has std::find

@sunxfancy 我总结了一下 lock-free queue可以分类以下几类 SPSC : 单个生产者,单个消费者,不用加锁 MPSC : 多个生产者,多个消费者,这种情况可以拆解成多个SPSC的情况,也可以不用加锁 MPMC : 多个生产者,多个消费者,[concurrentqueue](https://github.com/cameron314/concurrentqueue) ,的做法是每个p和c都有一个token,在自己的token上生产消费,可以不用加锁。 SPMC: 单个生产者,多个消费者,这种需要维护多个C的token,也可以不用加锁。 根据上面情况,我们是否可以对C的数量进行配置,一个C对应一个thread,可以参考[disruptor](https://github.com/LMAX-Exchange/disruptor), 另外MPMC的情况,比较复杂,考虑是否需要引入第三方库。