Hey Java Team, I actually got wondering after reading and hearing so many bad things about Thread Locals in combination with virtual thread, what you think about MDC logging. Having meta information in the logs is such a great help but moving them everywhere explicitly is such a pain. So the MDC was always a necessary evil I guess. Is there a suggested replacement in a virtual thread environment? Do we need to wait for scoped variables to get a performant replacement?
Yeah, I wondered the same thing.. although wouldn't the thread local stuff just be copied with the stack stuff on and off when it is swapped off being tied to a OS thread?
Damn, a pretty good video, pretty smart community, and you would think people would comment anything better than "Nth comment". What a shame... Eighth comment !!
Java tries so hard to stay relevant but this time I think you overdid it a little bit. VIrtual threads should have been made a separate API (maybe even not be called a "thread") not some wierd type of Thread so that everyone now has to deal with differentiating between the two. LIke he said, it breaks thread-locals and a couple of other things anyway. It's a leaky abstration now. Also: platform threads should have been called native or system threads IMO - nobody else calls them platform threads.
Diving very deep in Virtual Threads! Tks a lot for the class!!
O tech dos tech's!
Hey Java Team, I actually got wondering after reading and hearing so many bad things about Thread Locals in combination with virtual thread, what you think about MDC logging. Having meta information in the logs is such a great help but moving them everywhere explicitly is such a pain. So the MDC was always a necessary evil I guess. Is there a suggested replacement in a virtual thread environment? Do we need to wait for scoped variables to get a performant replacement?
Yeah, I wondered the same thing.. although wouldn't the thread local stuff just be copied with the stack stuff on and off when it is swapped off being tied to a OS thread?
In kotlin coroutines there's coroutines scope and that's where you keep the map. i suppose something like that will exist for vthreads.
Damn, a pretty good video, pretty smart community, and you would think people would comment anything better than "Nth comment". What a shame...
Eighth comment !!
Can I use Loom for Android if I'm using Kotlin? Is there any advantage of using it over coroutines?
not stable before 20, at least in my usage on server with vertx
Java tries so hard to stay relevant but this time I think you overdid it a little bit. VIrtual threads should have been made a separate API (maybe even not be called a "thread") not some wierd type of Thread so that everyone now has to deal with differentiating between the two. LIke he said, it breaks thread-locals and a couple of other things anyway. It's a leaky abstration now.
Also: platform threads should have been called native or system threads IMO - nobody else calls them platform threads.
Sixth Comment.
Virtual first comment 😂
Seventh comment.
Fourth comment
Third comment.
Fifth comment.
First Comment.
Second comment.