Add collaborative_call_once algorithm (#397)
collaborative_call_once is a function similar to std::call_once but allows waiting threads to join oneTBB parallel construction called inside the initializing functor. The semantics of exceptions is also similar to std::call_once: whenever the exception is thrown, it is rethrown on the initializing thread and this or other thread can try to call initializing functor again until it is completed without an exception. This pull request integrates #357. It is reworked to avoid dynamic memory allocation and fit the state into one word (see state machine in #267). In cooperation with @BenFrantzDale @HenryHeffanFormlabs Signed-off-by:Ilya Isaev <ilya.isaev@intel.com> Co-authored-by:
Alex <alexei.katranov@intel.com>
Loading
Please register or sign in to comment