14#include "arccore/concurrency/ConcurrencyGlobal.h"
17#include "arccore/base/ReferenceCounter.h"
19#include "arccore/base/NotSupportedException.h"
21#include "arccore/concurrency/ParallelFor.h"
22#include "arccore/concurrency/TaskFactory.h"
23#include "arccore/concurrency/ITaskImplementation.h"
24#include "arccore/concurrency/IThreadImplementationService.h"
25#include "arccore/concurrency/Task.h"
27#include "arccore/concurrency/NullThreadImplementation.h"
28#include "arccore/concurrency/SpinLock.h"
30#ifdef ARCCORE_HAS_GLIB
31#include "arccore/concurrency/GlibThreadImplementation.h"
50getThreadImplementation()
52 return global_thread_implementation.get();
62 global_thread_implementation = service;
64 global_thread_implementation = &global_null_thread_implementation;
72createGlibThreadImplementation()
74#ifdef ARCCORE_HAS_GLIB
77 throw NotSupportedException(A_FUNCINFO,
"GLib is not available Recompile Arccore with ARCCORE_ENABLE_GLIB=TRUE");
95createNullThreadImplementation()
97 return NullThreadImplementationFactory::create();
103void IThreadImplementation::
104_deprecatedCreateSpinLock(Int64* spin_lock_addr)
106 createSpinLock(spin_lock_addr);
112void IThreadImplementation::
113_deprecatedLockSpinLock(
Int64* spin_lock_addr,
Int64* scoped_spin_lock_addr)
115 lockSpinLock(spin_lock_addr, scoped_spin_lock_addr);
121void IThreadImplementation::
122_deprecatedUnlockSpinLock(
Int64* spin_lock_addr,
Int64* scoped_spin_lock_addr)
124 unlockSpinLock(spin_lock_addr, scoped_spin_lock_addr);
#define ARCCORE_DEFINE_REFERENCE_COUNTED_CLASS(class_name)
Macro to define methods and types for a class that uses a reference counter.
Management of references to a C++ class.
static Int32 maxAllowedThread()
Maximum number of allowed threads for multi-threading.
Implementation of ITreadImplementation with 'Glib'.
Int32 nbAllowedThread() const
Maximum number of threads used to manage tasks.
Interface of a service implementing thread support.
Implementation of threads in single-threaded mode.
Reference to an instance.
Encapsulation of a pointer with a reference counter.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
std::int64_t Int64
Signed integer type of 64 bits.
auto makeRef(InstanceType *t) -> Ref< InstanceType >
Creates a reference on a pointer.
std::int32_t Int32
Signed integer type of 32 bits.