Skip to content

Commit 44a4486

Browse files
committed
refactor: Add comments for dirty write cases
1 parent 73df616 commit 44a4486

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

include/libconcur/concurrent.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,7 @@ struct producer<trans::broadcast, relation::multi> {
370370
auto w_cur = trunc_index(hdr, w_idx);
371371
auto &elem = elems[w_cur];
372372
// Set data & flag. Dirty write is not considered here.
373+
// By default, when dirty writes occur, the writing behavior itself must be atomic.
373374
elem.set_flag(w_idx | state::enqueue_mask);
374375
elem.set_data(std::forward<U>(src));
375376
elem.set_flag(w_idx);

0 commit comments

Comments
 (0)