Skip to content

Commit 568fcf2

Browse files
docs: Correct the code for the custom concurrency policy in the example program
1 parent 78cb06b commit 568fcf2

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

examples/ex07_custom_policy.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@
1212
* - Program prints a success message and exits with code 0.
1313
*/
1414

15+
#include <atomic>
1516
#include <expected>
1617
#include <iostream>
1718
#include <type_traits>
1819

20+
1921
import mcpplibs.primitives;
2022
import mcpplibs.primitives.operations.invoker;
2123

@@ -79,6 +81,8 @@ struct mcpplibs::primitives::policy::concurrency::handler<
7981
injection_type out{};
8082
out.fence_before = true;
8183
out.fence_after = false;
84+
out.order_before = std::memory_order_acquire;
85+
out.order_after = std::memory_order_relaxed;
8286
return out;
8387
}
8488
};

0 commit comments

Comments
 (0)