JEP 487: Scoped Values (Fourth Preview)
Differences wirth thread local
no "two way" mutability
defined lifetime
memory leaks for pooled threads
Demo
Basic example in one thread
Example how to propagate ScopedValue with Structured concurrency
PreviousJEP 486: Permanently Disable the Security ManagerNextJEP 488: Primitive Types in Patterns, instanceof, and switch (Second Preview)
Last updated