Change ubuntu WSL2 Hostname permanently

CHANGE UBUNTU WSL2 HOSTNAME

It’s quite simple to change hostname in WSL2. That means you can easily change the wsl2 part in this screenshot: Most of the time changing the name in /etc/hostname is enough. However, to change wsl2 hostname permanently, you will need to do some more work. Step 1: Disable network auto generating config First open/create a … Read more

Java Concurrency CountDownLatch Tutorial

Java Concurrency CountDownLatch Tutorial

Overview CountDownLatch, as the name suggests, it provides a countdown mechanism. One use case of this class is to block the calling thread until all other specified threads are complete. It sounds vague, doesn’t it? Let’s consider one concrete example to boost our understanding. CountDownLatch Mechanism The principle of CountDownLatch is you create a countdown … Read more