j******n 发帖数: 271 | 1 Can anyone tell if it is safe to manipulate std::deque simultaneously,
without any locking, from two threads if care is taken so that one thread
always add to one end and the other always remove from the other? | z***9 发帖数: 696 | 2 I guess deque is not thread-safe, unless specifically mentioned. | j******n 发帖数: 271 | 3 A naive implementation of deque seems to allow safely adding at one end by
one thread and removing from the other end simultaneously. I would know if
there is anything in the implementation in std that breaks that. |
|