От: | · | ||
Дата: | 04.06.19 13:19 | ||
Оценка: |
Ни sig_atomic, ни volatile не подходят ни под один из указанных пунктов. Следовательно это data race. А значит поведение неопределено.A program that has two conflicting evaluations has a data race unless
* both evaluations execute on the same thread or in the same signal handler, or
* both conflicting evaluations are atomic operations (see std::atomic), or
* one of the conflicting evaluations happens-before another (see std::memory_order)
If a data race occurs, the behavior of the program is undefined.