4 ms·
A key point that I was particularly happy about is that ThreadLocals work well with virtual threads. My personal killer application: MDC for logging. I have jus
by moring 5y ago
A key point that I was particularly happy about is that ThreadLocals work well with virtual threads. My personal killer application: MDC for logging. I have just tried to build proper logging into a Javascript/Typescript application and none of the logging frameworks support MDC (or need cumbersome workarounds) because the async-isms in the underlying language prevent it from working as intended.
- aardvark179 5y agoThread locals work, but we think in scope locals we have a better more robust mechanism more suited to the way thread locals are used in things like logging libraries.