Skip to content

Commit

Permalink
Issue duckdb#7809: Window Work Stealing
Browse files Browse the repository at this point in the history
Rename Yield to avoid tripping over Windows macro madness...
  • Loading branch information
Richard Wesley committed Aug 7, 2023
1 parent 40fdc73 commit eff4ffc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/execution/operator/aggregate/physical_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ WindowGlobalSourceState::Task WindowGlobalSourceState::NextTask(idx_t hash_bin)

// If there is nothing to steal but there are unfinished partitions,
// yield until any pending builds are done.
TaskScheduler::GetScheduler(context).Yield();
TaskScheduler::GetScheduler(context).YieldThread();
}

return Task();
Expand Down
2 changes: 1 addition & 1 deletion src/include/duckdb/parallel/task_scheduler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class TaskScheduler {
void Signal(idx_t n);

//! Yield to other threads
void Yield();
void YieldThread();

//! Set the allocator flush threshold
void SetAllocatorFlushTreshold(idx_t threshold);
Expand Down
2 changes: 1 addition & 1 deletion src/parallel/task_scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ void TaskScheduler::Signal(idx_t n) {
#endif
}

void TaskScheduler::Yield() {
void TaskScheduler::YieldThread() {
#ifndef DUCKDB_NO_THREADS
std::this_thread::yield();
#endif
Expand Down

0 comments on commit eff4ffc

Please sign in to comment.