s**x 发帖数: 7506 | 1 差不多的题目,竟然被两个人问了。
one queue shared by one producer, one consumer thread,
how to avoid using a lock? | d*******d 发帖数: 2050 | 2 用个queue处理producer and consumer
【在 s**x 的大作中提到】 : 差不多的题目,竟然被两个人问了。 : one queue shared by one producer, one consumer thread, : how to avoid using a lock?
| a**********k 发帖数: 1953 | 3 lock-free data structure.
【在 s**x 的大作中提到】 : 差不多的题目,竟然被两个人问了。 : one queue shared by one producer, one consumer thread, : how to avoid using a lock?
| d******e 发帖数: 2265 | 4 问的好深。
想了想:笨法子,busy waiting or semaphore.
查了一下书:可以用member barrier (violate ) + interlocked.exchangecompare
来解决,queue是circular queue.
【在 s**x 的大作中提到】 : 差不多的题目,竟然被两个人问了。 : one queue shared by one producer, one consumer thread, : how to avoid using a lock?
|
|