---
title: "barrierOutsideDispatch(): function in Backends, TypeShade"
description: "barrierOutsideDispatch, a function in Backends. The error every CPU path throws when a barrier runs outside a dispatch…"
url: https://typeshade.dev/api/barrieroutsidedispatch/
language: en
---

# `barrierOutsideDispatch()`

Function in Backends

The error every CPU path throws when a barrier runs outside a dispatch: a barrier waits for the other invocations of the workgroup, and one invocation run alone, by a direct fns call or by a debug session, has none.

`import { barrierOutsideDispatch } from 'typeshade'`

The signature, the description and the examples come from the compiler's own source at commit af54ddad5.

## Syntax

```ts
const barrierOutsideDispatch: (fn: string) => Error
```

## Parameters

**`fn` `string`**

## Return value

`Error`

## Description

The values after it would be ones no workgroup produces, so the run refuses and names the fix.

## Source

[`src/core/intrinsics.ts`, line 155](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/intrinsics.ts#L155), at commit af54ddad5
