Re: Structured concurrency in Java 19+

2022-09-11 Thread Matt Sicker
Scoped variables are a great example! There’s a similar concept in some reactive streams APIs (which is also a standard Java API starting in 9) with “contexts”, and the same concept is also available in the standard Go library in its “context” package for associating arbitrary values with string

Re: Structured concurrency in Java 19+

2022-09-09 Thread Volkan Yazıcı
I expect scoped variables that will be introduced with Loom to replace MDC attached to threads. On Wed, Sep 7, 2022 at 8:41 PM Matt Sicker wrote: > Java 19 is coming out soon, and that includes a preview version of virtual > threads and structured concurrency APIs. While I’m not that familiar wi

Re: Structured concurrency in Java 19+

2022-09-08 Thread Ralph Goers
The brief read of https://openjdk.org/jeps/425 I did suggested that the major difference between Virtual Threads and Platform Threads is that Virtual Threads should not be pooled. So the only changes we would need to make would be to use a Virtual Thread Executor. However, it probably will simpl

Structured concurrency in Java 19+

2022-09-07 Thread Matt Sicker
Java 19 is coming out soon, and that includes a preview version of virtual threads and structured concurrency APIs. While I’m not that familiar with the Java implementation, I’d imagine it’ll have some similarities with Kotlin coroutines and other similar structured concurrency libraries. I’ve