Add cron.ScheduleTaskNonBlock for use with workers.Serve

This commit is contained in:
Ben Krieger 2024-10-30 20:38:51 -04:00
parent 8784539f6f
commit 84f6c350ca

View File

@ -55,3 +55,7 @@ func ScheduleTask(task Task) {
ready()
select {}
}
// ScheduleTaskNonBlock sets the Task to be executed but does not signal readiness or block
// indefinitely. The non-blocking form is meant to be used in conjunction with [workers.Serve].
func ScheduleTaskNonBlock(task Task) { scheduledTask = task }