14#include "arccore/concurrency/internal/ConcurrencyApplication.h"
16#include "arccore/base/CheckedConvert.h"
17#include "arccore/base/PlatformUtils.h"
18#include "arccore/base/FatalErrorException.h"
19#include "arccore/base/IStackTraceService.h"
20#include "arccore/base/internal/DependencyInjection.h"
22#include "arccore/trace/ITraceMng.h"
24#include "arccore/concurrency/ITaskImplementation.h"
25#include "arccore/concurrency/IThreadImplementation.h"
26#include "arccore/concurrency/IThreadImplementationService.h"
27#include "arccore/concurrency/TaskFactory.h"
28#include "arccore/concurrency/internal/TaskFactoryInternal.h"
46 DependencyInjection::Injector injector;
47 injector.fillWithGlobalFactories();
55 auto t = injector.createInstance<InterfaceType>(s,
true);
68void ConcurrencyApplication::
73 bool has_dbghelp =
false;
75 String dbghelp_service_name =
"DbgHelpStackTraceService";
80 if (v && v.value() != 0) {
81 names.add(
"BackwardCppStackTraceService");
83 names.add(
"LibUnwind");
84 names.add(
"DbgHelpStackTraceService");
86 if (found_name == dbghelp_service_name)
90 m_stack_trace_service = sv;
99 Impl::CoreArray<String> names;
101 Ref<ISymbolizerService> sv;
104 names.add(
"LLVMSymbolizer");
106 names.add(
"DbgHelpSymbolizerService");
109 m_symbolizer_service = sv;
116 ConstArrayView<String> names = build_info.threadImplementationServices();
120 ARCCORE_FATAL(
"Can not find implementation for 'IThreadImplementation' (names='{0}').", names);
121 m_thread_implementation_service = sv;
122 m_thread_implementation = sv->createImplementation();
123 Arccore::Concurrency::setThreadImplementation(m_thread_implementation.get());
124 m_thread_implementation->initialize();
134 Integer nb_task_thread = build_info.nbTaskThread();
135 if (nb_task_thread >= 0) {
137 ConstArrayView<String> names = build_info.taskImplementationServices();
141 TaskFactoryInternal::setImplementation(sv.get());
142 sv->initialize(nb_task_thread);
144 m_task_implementation = sv;
147 ARCCORE_FATAL(
"Can not find task implementation service (names='{0}')."
148 " Please check if Arcane is configured with Intel TBB library",
#define ARCCORE_FATAL(...)
Macro envoyant une exception FatalErrorException.
Ref< InterfaceType > tryCreateServiceUsingInjector(ConstArrayView< String > names, String *found_name, bool has_trace)
String m_used_task_service_name
Nom du service utilisé pour gérer les tâches.
ReferenceCounter< ITraceMng > m_trace
Gestionnaire de traces.
String m_used_thread_service_name
Nom du service utilisé pour gérer les threads.
Vue constante d'un tableau de type T.
static std::optional< Int32 > tryParseFromEnvironment(StringView s, bool throw_if_invalid)
Classe template pour convertir un type.
Tableau interne pour Arccore.
ConstArrayView< DataType > constView() const
Vue constante.
InstanceType * get() const
Instance associée ou nullptr si aucune.
Référence à une instance.
Chaîne de caractères unicode.
static void setVerboseLevel(Integer v)
Positionne le niveau de verbosité (0 pour pas d'affichage qui est le défaut).
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type représentant un entier.