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/internal/DependencyInjection.h"
21#include "arccore/trace/ITraceMng.h"
23#include "arccore/concurrency/ITaskImplementation.h"
24#include "arccore/concurrency/IThreadImplementation.h"
25#include "arccore/concurrency/IThreadImplementationService.h"
26#include "arccore/concurrency/TaskFactory.h"
27#include "arccore/concurrency/internal/TaskFactoryInternal.h"
45 DependencyInjection::Injector injector;
46 injector.fillWithGlobalFactories();
54 auto t = injector.createInstance<InterfaceType>(s,
true);
67void ConcurrencyApplication::
72 bool has_dbghelp =
false;
74 String dbghelp_service_name =
"DbgHelpStackTraceService";
79 if (v && v.value() != 0) {
80 names.add(
"BackwardCppStackTraceService");
82 names.add(
"LibUnwind");
83 names.add(
"DbgHelpStackTraceService");
85 if (found_name == dbghelp_service_name)
88 m_stack_trace_service = sv;
97 Impl::CoreArray<String> names;
99 Ref<ISymbolizerService> sv;
102 names.add(
"LLVMSymbolizer");
104 names.add(
"DbgHelpSymbolizerService");
107 m_symbolizer_service = sv;
114 ConstArrayView<String> names = build_info.threadImplementationServices();
118 ARCCORE_FATAL(
"Can not find implementation for 'IThreadImplementation' (names='{0}').", names);
119 m_thread_implementation_service = sv;
120 m_thread_implementation = sv->createImplementation();
121 Arccore::Concurrency::setThreadImplementation(m_thread_implementation.get());
122 m_thread_implementation->initialize();
132 Integer nb_task_thread = build_info.nbTaskThread();
133 if (nb_task_thread >= 0) {
135 ConstArrayView<String> names = build_info.taskImplementationServices();
139 TaskFactoryInternal::setImplementation(sv.get());
140 sv->initialize(nb_task_thread);
142 m_task_implementation = sv;
145 ARCCORE_FATAL(
"Can not find task implementation service (names='{0}')."
146 " 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 ARCCORE_BASE_EXPORT 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.
Référence à une instance.
InstanceType * get() const
Instance associée ou nullptr si aucune.
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.