mCRL2
Loading...
Searching...
No Matches
atermpp::detail::thread_aterm_pool_interface Class Referencefinal

A thread specific aterm pool that provides a local interface to the global term pool. Ensures that terms created by this thread are protected during garbage collection. More...

#include <aterm_pool.h>

Public Member Functions

 thread_aterm_pool_interface (aterm_pool &pool, std::function< void()> mark_function, std::function< void()> print_function, std::function< std::size_t()> protection_set_size_function)
 
 ~thread_aterm_pool_interface ()
 
void mark ()
 Mark the terms created by this thread to prevent them being garbage collected.
 
void print_local_performance_statistics () const
 Print performance statistics for data stored for this thread.
 
std::size_t protection_set_size () const
 
void unregister ()
 

Private Attributes

aterm_poolm_pool
 
std::function< void()> m_mark_function
 
std::function< void()> m_print_function
 
std::function< std::size_t()> m_protection_set_size_function
 
bool m_registered = true
 

Detailed Description

A thread specific aterm pool that provides a local interface to the global term pool. Ensures that terms created by this thread are protected during garbage collection.

Definition at line 39 of file aterm_pool.h.

Constructor & Destructor Documentation

◆ thread_aterm_pool_interface()

atermpp::detail::thread_aterm_pool_interface::thread_aterm_pool_interface ( aterm_pool pool,
std::function< void()>  mark_function,
std::function< void()>  print_function,
std::function< std::size_t()>  protection_set_size_function 
)
inline

Definition at line 226 of file aterm_pool.h.

◆ ~thread_aterm_pool_interface()

atermpp::detail::thread_aterm_pool_interface::~thread_aterm_pool_interface ( )
inline

Definition at line 243 of file aterm_pool.h.

Member Function Documentation

◆ mark()

void atermpp::detail::thread_aterm_pool_interface::mark ( )
inline

Mark the terms created by this thread to prevent them being garbage collected.

Definition at line 46 of file aterm_pool.h.

◆ print_local_performance_statistics()

void atermpp::detail::thread_aterm_pool_interface::print_local_performance_statistics ( ) const
inline

Print performance statistics for data stored for this thread.

Definition at line 52 of file aterm_pool.h.

◆ protection_set_size()

std::size_t atermpp::detail::thread_aterm_pool_interface::protection_set_size ( ) const
inline
Returns
The total number of terms residing in the pool.

Definition at line 58 of file aterm_pool.h.

◆ unregister()

void atermpp::detail::thread_aterm_pool_interface::unregister ( )
inline

Definition at line 233 of file aterm_pool.h.

Member Data Documentation

◆ m_mark_function

std::function<void()> atermpp::detail::thread_aterm_pool_interface::m_mark_function
private

Definition at line 68 of file aterm_pool.h.

◆ m_pool

aterm_pool& atermpp::detail::thread_aterm_pool_interface::m_pool
private

Definition at line 67 of file aterm_pool.h.

◆ m_print_function

std::function<void()> atermpp::detail::thread_aterm_pool_interface::m_print_function
private

Definition at line 69 of file aterm_pool.h.

◆ m_protection_set_size_function

std::function<std::size_t()> atermpp::detail::thread_aterm_pool_interface::m_protection_set_size_function
private

Definition at line 70 of file aterm_pool.h.

◆ m_registered

bool atermpp::detail::thread_aterm_pool_interface::m_registered = true
private

Definition at line 71 of file aterm_pool.h.


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