Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
Threading.hh File Reference
#include <array>
#include <cstddef>
#include <future>
#include <mutex>
#include <thread>

Go to the source code of this file.

Namespaces

namespace  PTL
 
namespace  PTL::ThisThread
 
namespace  PTL::Threading
 

Typedefs

using PTL::Thread = std::thread
 
using PTL::NativeThread = std::thread::native_handle_type
 
using PTL::Pid_t = std::thread::id
 
using PTL::Condition = std::condition_variable
 
using PTL::ThreadId = Thread::id
 
template<typename Tp >
using PTL::Future = std::future<Tp>
 
template<typename Tp >
using PTL::SharedFuture = std::shared_future<Tp>
 
template<typename Tp >
using PTL::Promise = std::promise<Tp>
 
using PTL::Mutex = std::mutex
 
using PTL::RecursiveMutex = std::recursive_mutex
 

Enumerations

enum  { PTL::Threading::SEQUENTIAL_ID = -2 , PTL::Threading::MASTER_ID = -1 , PTL::Threading::WORKER_ID = 0 , PTL::Threading::GENERICTHREAD_ID = -1000 }
 

Functions

template<typename Tp , typename MutexTp = Mutex, size_t N = 4>
MutexTp & PTL::TypeMutex (const unsigned int &_n=0)
 
Pid_t PTL::Threading::GetPidId ()
 
unsigned PTL::Threading::GetNumberOfPhysicalCpus ()
 
unsigned PTL::Threading::GetNumberOfCores ()
 
int PTL::Threading::GetThreadId ()
 
void PTL::Threading::SetThreadId (int aNewValue)
 
bool PTL::Threading::SetPinAffinity (int idx)
 
bool PTL::Threading::SetThreadPriority (int _v)
 
bool PTL::Threading::SetPinAffinity (int idx, NativeThread &_t)
 
bool PTL::Threading::SetThreadPriority (int _v, NativeThread &_t)