Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
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/* Implementation of threads using the C++ standard library. */
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
38{
39 public:
40
41 void build() {}
42
43 public:
44
45 Ref<IThreadImplementation> createImplementation() override
46 {
47 return Concurrency::createStdThreadImplementation();
48 }
49};
50
51/*---------------------------------------------------------------------------*/
52/*---------------------------------------------------------------------------*/
53
62{
63 public:
64
65 void build() {}
66
67 public:
68
69 Ref<IThreadImplementation> createImplementation() override
70 {
71 return Concurrency::createLegacyStdThreadImplementation();
72 }
73};
74
75/*---------------------------------------------------------------------------*/
76/*---------------------------------------------------------------------------*/
77
78ARCANE_DI_REGISTER_PROVIDER(StdThreadImplementationService,
79 DependencyInjection::ProviderProperty("StdThreadImplementationService"),
80 ARCANE_DI_INTERFACES(IThreadImplementationService),
81 ARCANE_DI_EMPTY_CONSTRUCTOR());
82
83ARCANE_DI_REGISTER_PROVIDER(LegacyStdThreadImplementationService,
84 DependencyInjection::ProviderProperty("LegacyStdThreadImplementationService"),
85 ARCANE_DI_INTERFACES(IThreadImplementationService),
86 ARCANE_DI_EMPTY_CONSTRUCTOR());
87
88/*---------------------------------------------------------------------------*/
89/*---------------------------------------------------------------------------*/
90
91} // namespace Arcane
92
93/*---------------------------------------------------------------------------*/
94/*---------------------------------------------------------------------------*/
Implementation of threads using LegacyStdBarrier for barriers.
Reference to an instance.
Implementation of threads using C++20 STL classes.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --