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"
48 DependencyInjection::Injector injector;
49 injector.fillWithGlobalFactories();
57 auto t = injector.createInstance<InterfaceType>(s,
true);
70void ConcurrencyApplication::
74 bool has_dbghelp =
false;
76 String dbghelp_service_name =
"DbgHelpStackTraceService";
81 if (v && v.value() != 0) {
82 names.add(
"BackwardCppStackTraceService");
84 names.add(
"LibUnwind");
85 names.add(
"DbgHelpStackTraceService");
87 if (found_name == dbghelp_service_name)
90 m_stack_trace_service = sv;
100 Impl::CoreArray<String> names;
102 Ref<ISymbolizerService> sv;
105 names.add(
"LLVMSymbolizer");
107 names.add(
"DbgHelpSymbolizerService");
110 m_symbolizer_service = sv;
117 ConstArrayView<String> names = build_info.threadImplementationServices();
121 ARCCORE_FATAL(
"Can not find implementation for 'IThreadImplementation' (names='{0}').", names);
122 m_thread_implementation_service = sv;
123 m_thread_implementation = sv->createImplementation();
124 Arccore::Concurrency::setThreadImplementation(m_thread_implementation.get());
125 m_thread_implementation->initialize();
135 Integer nb_task_thread = build_info.nbTaskThread();
136 if (nb_task_thread >= 0) {
138 ConstArrayView<String> names = build_info.taskImplementationServices();
142 TaskFactoryInternal::setImplementation(sv.get());
143 sv->initialize(nb_task_thread);
145 m_task_implementation = sv;
148 ARCCORE_FATAL(
"Can not find task implementation service (names='{0}')."
149 " Please check if Arcane is configured with Intel TBB library",
#define ARCCORE_FATAL(...)
Macro throwing a FatalErrorException.
Ref< InterfaceType > tryCreateServiceUsingInjector(ConstArrayView< String > names, String *found_name, bool has_trace)
String m_used_task_service_name
Name of the service used to manage tasks.
ReferenceCounter< ITraceMng > m_trace
Trace manager.
String m_used_thread_service_name
Name of the service used to manage threads.
Constant view of an array of type T.
static std::optional< Int32 > tryParseFromEnvironment(StringView s, bool throw_if_invalid)
Template class for converting a type.
Internal array for Arccore.
ConstArrayView< DataType > constView() const
Constant view.
InstanceType * get() const
Associated instance or nullptr if none.
Reference to an instance.
Unicode character string.
static void setVerboseLevel(Integer v)
Sets the verbosity level (0 for no output, which is the default).
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.