![]() |
MySQL 9.5.0
Source Code Documentation
|
The Garbage Collection logic is determined by the occurrence of events such as: More...
#include <polyglot_garbage_collector.h>
Classes | |
| struct | Config |
Public Types | |
| enum class | Event { EXECUTED_STATEMENT , TERMINATED_LANGUAGE , TERMINATE } |
| using | Time_point = std::chrono::time_point< std::chrono::system_clock > |
Public Member Functions | |
| Garbage_collector ()=default | |
| ~Garbage_collector () | |
| Garbage_collector (const Garbage_collector &other)=delete | |
| Garbage_collector (Garbage_collector &&other)=delete | |
| Garbage_collector & | operator= (const Garbage_collector &other)=delete |
| Garbage_collector & | operator= (Garbage_collector &&other)=delete |
| void | notify (Event event) |
| void | start (Config &&config, poly_isolate isolate) |
| void | stop () |
Private Types | |
| enum class | State { INITIAL , STARTED , TERMINATED , ERROR } |
Private Member Functions | |
| void | run (poly_isolate isolate) |
| void | set_state (State state, const std::string &error="") |
Private Attributes | |
| std::mutex | m_mutex |
| std::mutex | m_state_mutex |
| std::condition_variable | m_condition |
| std::unique_ptr< std::thread > | m_thread |
| State | m_state = State::INITIAL |
| std::string | m_error |
| Config | m_config |
| bool | m_terminated = false |
| size_t | m_statement_count = 0 |
| size_t | m_language_count = 0 |
| Time_point | m_last_gctime |
The Garbage Collection logic is determined by the occurrence of events such as:
The trigger for GC operations is defined by the following optional configurations:
Additionally, when the garbage collector may be stopped (i.e. when terminating the application), in such case, a GC operation will be triggered despite the state of the configurable options.
This class keeps the Garbage Collection configuration and executes GC in a separate thread based on the configuration and reported events.
| using shcore::polyglot::Garbage_collector::Time_point = std::chrono::time_point<std::chrono::system_clock> |
|
strong |
|
strongprivate |
|
default |
| shcore::polyglot::Garbage_collector::~Garbage_collector | ( | ) |
|
delete |
|
delete |
| void shcore::polyglot::Garbage_collector::notify | ( | Event | event | ) |
|
delete |
|
delete |
|
private |
|
private |
| void shcore::polyglot::Garbage_collector::start | ( | Config && | config, |
| poly_isolate | isolate | ||
| ) |
| void shcore::polyglot::Garbage_collector::stop | ( | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |