add doc comment for WaitUntil

This commit is contained in:
syumai 2023-03-29 21:11:01 +09:00
parent 580f856fda
commit db9b89a81e

View File

@ -8,6 +8,9 @@ import (
"github.com/syumai/workers/internal/jsutil"
)
// WaitUntil extends the lifetime of the "fetch" event.
// It accepts an asynchronous task which the Workers runtime will execute before the handler terminates but without blocking the response.
// see: https://developers.cloudflare.com/workers/runtime-apis/fetch-event/#waituntil
func WaitUntil(ctx context.Context, task func()) {
executionContext := cfruntimecontext.GetExecutionContext(ctx)