---
title: fstctx
summary: Experimental. This package is unstable and may change.
url: https://www.fastly.com/documentation/reference/compute/sdks/go/compute-sdk-go/x/fstctx/
---

**Kind:** Module  
**Package:** compute-sdk-go v1.11.0  
**Path:** `github.com/fastly/compute-sdk-go/x/fstctx`

**Experimental.** This package is unstable and may change.

Package fstctx provides alternatives to context.WithTimeout and
context.WithDeadline. At the time of writing, TinyGo does not support the
runtime methods needed to support those time based operations.

All packages in `x`, including package fstctx, should be considered
temporary, experimental, and unstable.

Deprecated: Use the standard library `context` package instead.

## Functions

| Name | Summary |
| --- | --- |
| [WithDeadline](https://www.fastly.com/documentation/reference/compute/sdks/go/compute-sdk-go/x/fstctx/fn.WithDeadline/) | WithDeadline returns a copy of the parent context which will be cancelled when the deadline arrives. Unlike context.WithDeadline the deadline will not be adjusted, and it will not return the context.DeadlineExceeded error. Canceling before the deadline will not clean up the spawned goroutine however the goroutine will become a no-op. It is possible for pauses in Wasm execution to cause the cancellation to happen after the deadline. This should not be relied on for applications where a precise deadline is required. |
| [WithTimeout](https://www.fastly.com/documentation/reference/compute/sdks/go/compute-sdk-go/x/fstctx/fn.WithTimeout/) | WithTimeout returns a copy of the parent context which will be cancelled after the provided timeout. Unlike context.WithTimeout the deadline will not be adjusted, and it will not return the context.DeadlineExceeded error. Canceling before the timeout will not clean up the spawned goroutine however the goroutine will become a no-op. It is possible for pauses in Wasm execution to cause the timeout to be delayed. This should not be relied on for applications where a precise timout is required. |
