Гарантирует ли *happen-before* порядок доставки данных в файл?C++

Программы на C++. Форум разработчиков
Anonymous
Гарантирует ли *happen-before* порядок доставки данных в файл?

Сообщение Anonymous »

Рассмотрим этот пример:

Код: Выделить всё

#include 
#include 
#include 

int main(){
std::ofstream outFile("example.txt", std::ios::out | std::ios::trunc);
std::atomic flag = false;
auto t1 = std::thread([&](){
outFile 

Подробнее здесь: [url]https://stackoverflow.com/questions/79855089/does-the-happen-before-guarantee-the-order-of-delivery-for-data-to-a-file[/url]

Вернуться в «C++»