mirror of
https://github.com/syumai/workers.git
synced 2025-03-10 17:29:11 +00:00
add doc comment for WaitUntil
This commit is contained in:
parent
580f856fda
commit
db9b89a81e
@ -8,6 +8,9 @@ import (
|
|||||||
"github.com/syumai/workers/internal/jsutil"
|
"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()) {
|
func WaitUntil(ctx context.Context, task func()) {
|
||||||
executionContext := cfruntimecontext.GetExecutionContext(ctx)
|
executionContext := cfruntimecontext.GetExecutionContext(ctx)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user