method

TypedTask.Cancel

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

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

Source core/task.go:301

@param ctx
The ctx value.
@param application
The application value.
@param id
The id value.
@returns
The declared result.

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.