Arcane  v4.1.5.0
Documentation utilisateur
Chargement...
Recherche...
Aucune correspondance
StdThreadImplementationService.cc
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* StdThreadImplementationService.cc (C) 2000-2026 */
9/* */
10/* Implémentation des threads utilisant la bibliothèque standard C++. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arccore/concurrency/ConcurrencyGlobal.h"
15
16#include "arccore/base/FatalErrorException.h"
17#include "arccore/base/NotSupportedException.h"
18#include "arccore/base/internal/DependencyInjection.h"
19
20#include "arccore/concurrency/internal/ConcurrencyGlobalInternal.h"
21#include "arccore/concurrency/IThreadImplementation.h"
22#include "arccore/concurrency/IThreadImplementationService.h"
23
24/*---------------------------------------------------------------------------*/
25/*---------------------------------------------------------------------------*/
26
27namespace Arcane
28{
29
30/*---------------------------------------------------------------------------*/
31/*---------------------------------------------------------------------------*/
32/*!
33 * \brief Implémentation des threads utilisant les classes C++20 de la STL.
34 */
37{
38 public:
39
40 void build() {}
41
42 public:
43
44 Ref<IThreadImplementation> createImplementation() override
45 {
46 return Concurrency::createStdThreadImplementation();
47 }
48};
49
50/*---------------------------------------------------------------------------*/
51/*---------------------------------------------------------------------------*/
52/*!
53 * \brief Implémentation des threads utilisant LegacyStdBarrier pour les barrières.
54 *
55 * Cette implémentation n'est utile que tant que la classe StdThreadImplementation
56 * est en cours de validation (mars 2026). Elle pourra être supprimée par la suite.
57 */
60{
61 public:
62
63 void build() {}
64
65 public:
66
67 Ref<IThreadImplementation> createImplementation() override
68 {
69 return Concurrency::createLegacyStdThreadImplementation();
70 }
71};
72
73/*---------------------------------------------------------------------------*/
74/*---------------------------------------------------------------------------*/
75
76ARCANE_DI_REGISTER_PROVIDER(StdThreadImplementationService,
77 DependencyInjection::ProviderProperty("StdThreadImplementationService"),
78 ARCANE_DI_INTERFACES(IThreadImplementationService),
79 ARCANE_DI_EMPTY_CONSTRUCTOR());
80
81ARCANE_DI_REGISTER_PROVIDER(LegacyStdThreadImplementationService,
82 DependencyInjection::ProviderProperty("LegacyStdThreadImplementationService"),
83 ARCANE_DI_INTERFACES(IThreadImplementationService),
84 ARCANE_DI_EMPTY_CONSTRUCTOR());
85
86/*---------------------------------------------------------------------------*/
87/*---------------------------------------------------------------------------*/
88
89} // namespace Arcane
90
91/*---------------------------------------------------------------------------*/
92/*---------------------------------------------------------------------------*/
Implémentation des threads utilisant LegacyStdBarrier pour les barrières.
Référence à une instance.
Implémentation des threads utilisant les classes C++20 de la STL.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-