Skip to content
googlePublic

About

Strands provides structured concurrency for Java using virtual threads, reducing the syntactic overhead of traditional asynchronous frameworks.

Resources

Code of conduct

Contributing

Security policy

Stars

4 stars

Watchers

0 watching

Forks

Strands

GitHub Release CI

Strands provides structured concurrency for Java using virtual threads, reducing the syntactic overhead of traditional asynchronous frameworks.

Note

Strands requires Java 25 or higher.

Important

This is not an officially supported Google product. This project is not eligible for the Google Open Source Software Vulnerability Rewards Program.

Overview

Strands simplifies asynchronous Java programming by leveraging virtual threads to write sequential-style code that executes concurrently. It provides structured concurrency primitives (such as scopes, tasks, and gatherers) to manage complex concurrency graphs reliably and safely.

Key Features

Strands provides the following core capabilities:

  • Structured Concurrency: Manage task lifetimes and cancellation within well-defined scopes.
  • Virtual Thread Integration: Eliminate nested callbacks and Future chains using Java 25+ Virtual Threads.
  • Fluent Gathering and Composition: Collect, compose, and transform results across multiple asynchronous tasks.

Documentation

See the docs directory for the following guides:

  • Overview and Getting Started: Introduction, code examples, and benefits.
  • Concepts: Scopes, structured concurrency, context propagation, and the Strand lifecycle.
  • Failures: Fail-fast defaults, Result<T> functional error handling, and combinators.
  • Early Termination: Cancellation, timeouts, and interruption handling.
  • Gatherers: Stream gatherer integration and concurrent streaming pipelines.
  • Interoperability: Bridges to ListenableFuture, standard Future, and functional interfaces.
  • Style Guide: Idiomatic usage patterns, best practices, and anti-patterns.
  • Testing: Synchronous testing with StrandsRule and @InStrand.
  • Roadmap: Planned features, architectural goals, and JDK tracking.

Links

Access project resources and report issues using the following links:

Contributing

See CONTRIBUTING and CODE_OF_CONDUCT for details on how to contribute to Strands.

See SECURITY for details on how to report security issues.

License

The Apache 2.0 License governs Strands. See the LICENSE file for details.

About

Strands provides structured concurrency for Java using virtual threads, reducing the syntactic overhead of traditional asynchronous frameworks.

Resources

Code of conduct

Contributing

Security policy

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages