Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Internal::RSlotStack Class Reference

A thread-safe list of N indexes (0 to size - 1).

RSlotStack can be used to atomically assign a "processing slot" number to each thread in multi-threaded applications. When there are no more slots available, the thread busy-waits for a slot. This case should be avoided by the scheduler.

Definition at line 25 of file RSlotStack.hxx.

Classes

struct  AtomicWrapper
 

Public Member Functions

 RSlotStack ()=delete
 
 RSlotStack (unsigned int size)
 
unsigned int GetSlot ()
 
void ReturnSlot (unsigned int slotNumber)
 

Private Attributes

std::vector< AtomicWrapperfSlots
 

#include <ROOT/RSlotStack.hxx>

Constructor & Destructor Documentation

◆ RSlotStack() [1/2]

ROOT::Internal::RSlotStack::RSlotStack ( )
delete

◆ RSlotStack() [2/2]

ROOT::Internal::RSlotStack::RSlotStack ( unsigned int size)

Definition at line 16 of file RSlotStack.cxx.

Member Function Documentation

◆ GetSlot()

unsigned int ROOT::Internal::RSlotStack::GetSlot ( )

Definition at line 28 of file RSlotStack.cxx.

◆ ReturnSlot()

void ROOT::Internal::RSlotStack::ReturnSlot ( unsigned int slotNumber)

Definition at line 18 of file RSlotStack.cxx.

Member Data Documentation

◆ fSlots

std::vector<AtomicWrapper> ROOT::Internal::RSlotStack::fSlots
private

Definition at line 39 of file RSlotStack.hxx.

Libraries for ROOT::Internal::RSlotStack:

The documentation for this class was generated from the following files: