method

TypedTask.Cancel

Cancel atomically prevents a queued task from starting and fences a running attempt so its later heartbeat/completion cannot win.

Arguments

ArgumentTypeDescription
ctxcontext.ContextThe ctx value.
application*AppThe application value.
idstringThe id value.

Returns

The declared result.

error

Full signature

func (task TypedTask[Input, Output]) Cancel( ctx context.Context, application *App, id string, ) error

Source core/task.go:301

Related types

  • TypedTask

    Compiled typed durable-task definition.

  • Input

    A presence-aware value used by nullable generated Go mutation fields.

  • App

    A resolved application bound to operation services.