C++ Logo

std-discussion

Advanced search

Contradiction in the description of the function std::call_once

From: Vladimir Grigoriev <vlad.moscow_at_[hidden]>
Date: Wed, 01 Mar 2023 22:19:51 +0300
It seems there is a logical contradiction in the description of function std::call_once.
 
On the one hand, there is written
 
«An execution of call_once that calls its func is an active execution.»
 
and
 
«Among all executions of call_once for any given once_flag: at most one is a returning execution; if there is a returning execution, it is the last active execution; and there are passive executions only if there is a returning execution»
 
So if to exclude an exceptional execution then actually there can be at most only one active execution.
 
However further there is written: «For any given once_flag: all active executions occur in a total order»
 
What active executions? The function func can be called only once. So we can have only one active execution. All others are passive executions.
 
With best regards,
(Vlad from Moscow)
 
 
 
 
You can meet me at http://cpp.forum24.ru/ or www.stackoverflow.com or http://ru.stackoverflow.com

Received on 2023-03-01 19:19:59