MCPcopy Create free account
hub / github.com/apache/cloudberry / WaitForCronTasks

Function WaitForCronTasks

src/backend/task/pg_cron.c:747–760  ·  view source on GitHub ↗

* WaitForCronTasks blocks waiting for any active task for at most * 1 second. */

Source from the content-addressed store, hash-verified

745 * 1 second.
746 */
747static void
748WaitForCronTasks(List *taskList)
749{
750 int taskCount = list_length(taskList);
751
752 if (taskCount > 0)
753 {
754 PollForTasks(taskList);
755 }
756 else
757 {
758 WaitForLatch(MaxWait);
759 }
760}
761
762/*
763 * WaitForLatch waits for the given number of milliseconds unless a signal

Callers 1

PgCronLauncherMainFunction · 0.85

Calls 3

list_lengthFunction · 0.85
PollForTasksFunction · 0.85
WaitForLatchFunction · 0.85

Tested by

no test coverage detected