mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2025-12-06 16:56:45 +08:00
refactor: Add comments for dirty write cases
This commit is contained in:
parent
73df616f8b
commit
44a4486160
@ -370,6 +370,7 @@ struct producer<trans::broadcast, relation::multi> {
|
|||||||
auto w_cur = trunc_index(hdr, w_idx);
|
auto w_cur = trunc_index(hdr, w_idx);
|
||||||
auto &elem = elems[w_cur];
|
auto &elem = elems[w_cur];
|
||||||
// Set data & flag. Dirty write is not considered here.
|
// Set data & flag. Dirty write is not considered here.
|
||||||
|
// By default, when dirty writes occur, the writing behavior itself must be atomic.
|
||||||
elem.set_flag(w_idx | state::enqueue_mask);
|
elem.set_flag(w_idx | state::enqueue_mask);
|
||||||
elem.set_data(std::forward<U>(src));
|
elem.set_data(std::forward<U>(src));
|
||||||
elem.set_flag(w_idx);
|
elem.set_flag(w_idx);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user