FIND YOUR NEXT FEW LINES

Results for “Async work & status”

Small, practical examples. Search by task or narrow things down below.

571 snippets foundClear filters
RustVectors & slices

Inspect overlapping windows

Inspect overlapping windows in a complete Rust program using the standard library.

Rust✓ Tested
Bash ScriptsFunction scope & composition

Isolate variable changes in a subshell

Bash Scripts: Parentheses create a subshell whose variable assignments do not change the parent.

Bash Scripts✓ Tested
GoSlices & collections

Iterate over bounded chunks

Iterate over bounded chunks using a complete Go program with explicit sample inputs.

Go✓ Tested
RustMaps & sets

Iterate over keys in sorted order

Iterate over keys in sorted order in a complete Rust program using the standard library.

Rust✓ Tested
Bash ScriptsArray operations

Join array items with a one-character separator

Bash Scripts: A local IFS controls the separator used by the quoted star expansion.

Bash Scripts✓ Tested
GoFiles & paths

Join portable path components

Join portable path components using a complete Go program with explicit sample inputs.

Go✓ Tested
RustStrings & Unicode

Join string slices

Join string slices in a complete Rust program using the standard library.

Rust✓ Tested
GoStrings & text

Join words with a separator

Join words with a separator using a complete Go program with explicit sample inputs.

Go✓ Tested
Bash ScriptsFunction scope & composition

Keep a function variable local

Bash Scripts: Local prevents an ordinary function assignment from replacing a caller variable.

Bash Scripts✓ Tested
RustErrors & optional values

Keep an optional value only when valid

Keep an optional value only when valid in a complete Rust program using the standard library.

Rust✓ Tested
Bash ScriptsProcesses & environment

Keep loop state by avoiding a pipeline subshell

Bash Scripts: Redirect input into a while loop so updates to a counter remain in the current shell.

Bash Scripts✓ Tested
RustVectors & slices

Keep only values satisfying a condition

Keep only values satisfying a condition in a complete Rust program using the standard library.

Rust✓ Tested