|
|
Executor & | executor |
|
atomic< idx_t > | finished_tasks |
| | The current threads working on the event.
|
|
atomic< idx_t > | total_tasks |
| | The maximum amount of threads that can work on the event.
|
| atomic< idx_t > | finished_dependencies |
|
idx_t | total_dependencies |
| | The total amount of dependencies.
|
|
vector< weak_ptr< Event > > | parents |
| | The events that depend on this event to run.
|
|
vector< reference< Event > > | parents_raw |
| | Raw pointers to the parents (used for verification only).
|
|
atomic< bool > | finished |
| | Whether or not the event is finished executing.
|
|
| enable_shared_from_this & | operator= (enable_shared_from_this const &) noexcept |
◆ Event()
| duckdb::Event::Event |
( |
Executor & | executor | ) |
|
|
explicit |
328012}
idx_t total_dependencies
The total amount of dependencies.
Definition duckdb.cpp:35109
atomic< bool > finished
Whether or not the event is finished executing.
Definition duckdb.cpp:35117
atomic< idx_t > finished_dependencies
Definition duckdb.cpp:35107
atomic< idx_t > total_tasks
The maximum amount of threads that can work on the event.
Definition duckdb.cpp:35103
atomic< idx_t > finished_tasks
The current threads working on the event.
Definition duckdb.cpp:35101
◆ FinishEvent()
| virtual void duckdb::Event::FinishEvent |
( |
| ) |
|
|
inlinevirtual |
◆ FinalizeFinish()
| virtual void duckdb::Event::FinalizeFinish |
( |
| ) |
|
|
inlinevirtual |
◆ FinishTask()
| void duckdb::Event::FinishTask |
( |
| ) |
|
328056 {
328060 D_ASSERT(current_finished <= current_tasks);
328061 if (current_finished == current_tasks) {
328062 Finish();
328063 }
328064}
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237
◆ Finish()
| void duckdb::Event::Finish |
( |
| ) |
|
328027 {
328031
328032 for (
auto &parent_entry :
parents) {
328033 auto parent = parent_entry.lock();
328034 if (!parent) {
328035 continue;
328036 }
328037
328038 parent->CompleteDependency();
328039 }
328041}
virtual void FinishEvent()
Called right after the event is finished.
Definition duckdb.cpp:35057
virtual void FinalizeFinish()
Called after the event is entirely finished.
Definition duckdb.cpp:35060
vector< weak_ptr< Event > > parents
The events that depend on this event to run.
Definition duckdb.cpp:35112
◆ AddDependency()
| void duckdb::Event::AddDependency |
( |
Event & | event | ) |
|
328043 {
328045 event.parents.push_back(weak_ptr<Event>(shared_from_this()));
328046#ifdef DEBUG
328047 event.parents_raw.push_back(*this);
328048#endif
328049}
◆ HasDependencies()
| bool duckdb::Event::HasDependencies |
( |
| ) |
const |
|
inline |
◆ GetParentsVerification()
| const vector< reference< Event > > & duckdb::Event::GetParentsVerification |
( |
| ) |
const |
328051 {
328054}
vector< reference< Event > > parents_raw
Raw pointers to the parents (used for verification only).
Definition duckdb.cpp:35114
◆ CompleteDependency()
| void duckdb::Event::CompleteDependency |
( |
| ) |
|
328014 {
328018
328020 Schedule();
328022 Finish();
328023 }
328024 }
328025}
◆ SetTasks()
| void duckdb::Event::SetTasks |
( |
vector< shared_ptr< Task > > | tasks | ) |
|
328079 {
328080 auto &ts = TaskScheduler::GetScheduler(executor.context);
328082 D_ASSERT(!tasks.empty());
328084 ts.ScheduleTasks(executor.GetToken(), tasks);
328085}
◆ InsertEvent()
| void duckdb::Event::InsertEvent |
( |
shared_ptr< Event > | replacement_event | ) |
|
328070 {
328071 replacement_event->parents = std::move(
parents);
328072#ifdef DEBUG
328073 replacement_event->parents_raw = std::move(
parents_raw);
328074#endif
328075 replacement_event->AddDependency(*this);
328076 executor.AddEvent(std::move(replacement_event));
328077}
◆ IsFinished()
| bool duckdb::Event::IsFinished |
( |
| ) |
const |
|
inline |
◆ PrintPipeline()
| virtual void duckdb::Event::PrintPipeline |
( |
| ) |
|
|
inlinevirtual |
◆ GetClientContext()
328066 {
328067 return executor.context;
328068}
◆ Cast() [1/2]
template<class TARGET>
| TARGET & duckdb::Event::Cast |
( |
| ) |
|
|
inline |
35088 {
35089 DynamicCastCheck<TARGET>(this);
35090 return reinterpret_cast<TARGET &>(*this);
35091 }
◆ Cast() [2/2]
template<class TARGET>
| const TARGET & duckdb::Event::Cast |
( |
| ) |
const |
|
inline |
35093 {
35094 DynamicCastCheck<TARGET>(this);
35095 return reinterpret_cast<const TARGET &>(*this);
35096 }
◆ finished_dependencies
| atomic<idx_t> duckdb::Event::finished_dependencies |
|
protected |
The amount of completed dependencies The event can only be started after the dependencies have finished executing
The documentation for this class was generated from the following file: