---
title: "ClikaRT::SynchronousStreamScope"
sidebar_label: "SynchronousStreamScope"
description: "While alive, every op dispatched on the calling thread WAITS for completion before the dispatch call returns, and stream runs at most one task at a time, so the moment a dispatch returns, the result i…"
---

<!-- Generated by tools/doxygen2mdx from Doxygen XML. Do not edit. -->

<span class="api-kind api-kind--class">class</span>

**Header:** `ClikaRT/compute/scope.h`

While alive, every op dispatched on the calling thread WAITS for completion before the dispatch call returns, and `stream` runs at most one task at a time, so the moment a dispatch returns, the result is ready ([`Stream::query_idle()`](./Stream.md#query_idle) is true). Deterministic, ideal for debugging / per-op stepping; it trades away the throughput that async pipelining buys. The stream's prior limit is restored on destruction. Open it only on a quiescent stream (synchronize first). Non-copyable, non-movable.

## Member functions

### SynchronousStreamScope(Stream) {#SynchronousStreamScope}

<div class="api-signature">

`explicit` **`SynchronousStreamScope`**(`const` [`Stream`](./Stream.md)`&` `stream`)

</div>

Enter: ops issued on `stream` from this thread run synchronously until the scope exits.

<div class="api-declared">

Declared in `ClikaRT/compute/scope.h`, line 54

</div>

### \~SynchronousStreamScope() {#SynchronousStreamScope-2}

<div class="api-signature">

**`~SynchronousStreamScope`**()

</div>

Exit: restores the stream's ordinary asynchronous issue.

<div class="api-declared">

Declared in `ClikaRT/compute/scope.h`, line 56

</div>

### SynchronousStreamScope(SynchronousStreamScope) {#SynchronousStreamScope-3}

<div class="api-signature">

**`SynchronousStreamScope`**(`const SynchronousStreamScope&`) `=delete`

</div>

<div class="api-declared">

Declared in `ClikaRT/compute/scope.h`, line 57

</div>

### operator=() {#operator-assign}

<div class="api-signature">

[`SynchronousStreamScope`](./SynchronousStreamScope.md)`&` **`operator=`**(`const` [`SynchronousStreamScope`](./SynchronousStreamScope.md)`&`) `=delete`

</div>

<div class="api-declared">

Declared in `ClikaRT/compute/scope.h`, line 58

</div>
