From eff4ffce64f4f0310b841fd74d8cf84d05806202 Mon Sep 17 00:00:00 2001 From: Richard Wesley Date: Mon, 7 Aug 2023 14:06:20 -0700 Subject: [PATCH] Issue #7809: Window Work Stealing Rename Yield to avoid tripping over Windows macro madness... --- src/execution/operator/aggregate/physical_window.cpp | 2 +- src/include/duckdb/parallel/task_scheduler.hpp | 2 +- src/parallel/task_scheduler.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/execution/operator/aggregate/physical_window.cpp b/src/execution/operator/aggregate/physical_window.cpp index 54e23419b9c..1298bfdb92f 100644 --- a/src/execution/operator/aggregate/physical_window.cpp +++ b/src/execution/operator/aggregate/physical_window.cpp @@ -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(); diff --git a/src/include/duckdb/parallel/task_scheduler.hpp b/src/include/duckdb/parallel/task_scheduler.hpp index 787b7dfdb4e..d3171c55ddc 100644 --- a/src/include/duckdb/parallel/task_scheduler.hpp +++ b/src/include/duckdb/parallel/task_scheduler.hpp @@ -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); diff --git a/src/parallel/task_scheduler.cpp b/src/parallel/task_scheduler.cpp index e4764dc2629..d0d3bed5b66 100644 --- a/src/parallel/task_scheduler.cpp +++ b/src/parallel/task_scheduler.cpp @@ -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