grpc / grpc/grpc-java

Context ScopedValue backend

Open
#12,768 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
12.1k
Forks
4k
Avg merge
2d 17h
Merged PRs (30d)
37

Description

In recent Java versions, thread locals are softly deprecated in favor of `ScopedValue`, which made its stable appearance in Java 25. Would it be possible to optionally have `io.grpc.Context` store itself in a `ScopedValue` rather than a thread-local? This would allow `Context` to work nicely with [structured concurrency](https://openjdk.org/jeps/533).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.