<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ayan Dutta</title>
    <description>The latest articles on DEV Community by Ayan Dutta (@mrayandutta).</description>
    <link>https://dev.to/mrayandutta</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F939369%2F2733c130-1d4b-42b3-9b45-fbf31a2a5e7c.jpeg</url>
      <title>DEV Community: Ayan Dutta</title>
      <link>https://dev.to/mrayandutta</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mrayandutta"/>
    <language>en</language>
    <item>
      <title>Java Virtual Threads Deep Dive: How Mounting &amp; Unmounting Really Work</title>
      <dc:creator>Ayan Dutta</dc:creator>
      <pubDate>Sun, 14 Sep 2025 11:53:34 +0000</pubDate>
      <link>https://dev.to/mrayandutta/java-virtual-threads-deep-dive-how-mounting-unmounting-really-work-5hh5</link>
      <guid>https://dev.to/mrayandutta/java-virtual-threads-deep-dive-how-mounting-unmounting-really-work-5hh5</guid>
      <description>&lt;p&gt;Java 21 introduced &lt;strong&gt;Virtual Threads (Project Loom)&lt;/strong&gt; — lightweight threads that make massive concurrency possible.&lt;br&gt;&lt;br&gt;
But the real magic is under the hood: &lt;strong&gt;mounting&lt;/strong&gt; and &lt;strong&gt;unmounting&lt;/strong&gt;.  &lt;/p&gt;

&lt;p&gt;In this video, I’ll explain how Virtual Threads are scheduled, how &lt;strong&gt;carrier threads&lt;/strong&gt; work, and why this matters for Spring Boot developers.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🔍 Why This Matters&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Platform Threads = 1:1 with OS threads → heavy, limited.
&lt;/li&gt;
&lt;li&gt;Virtual Threads = lightweight and plentiful.
&lt;/li&gt;
&lt;li&gt;But they &lt;strong&gt;still run on carrier threads&lt;/strong&gt; in the JVM’s ForkJoinPool.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Knowing when a Virtual Thread &lt;strong&gt;mounts&lt;/strong&gt; (assigned to a carrier) and &lt;strong&gt;unmounts&lt;/strong&gt; (frees carrier during blocking I/O) is critical to avoid performance bottlenecks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📚 What You’ll Learn&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Platform vs Virtual Threads&lt;/strong&gt; → Key architectural differences
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ForkJoinPool Scheduler&lt;/strong&gt; → How the JVM manages carrier threads
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mounting&lt;/strong&gt; → How Virtual Threads get assigned
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unmounting&lt;/strong&gt; → What happens during blocking I/O
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CPU vs I/O tasks&lt;/strong&gt; → Why they behave differently
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;JDK internals&lt;/strong&gt; → Insights from real code examples
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;💡 Key Takeaway&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Virtual Threads automatically &lt;strong&gt;unmount during blocking operations&lt;/strong&gt;, freeing carrier threads to handle other work.&lt;br&gt;&lt;br&gt;
That’s why Java apps can scale to thousands (or even millions) of concurrent tasks without killing memory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📚 Want to Go Further?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This video is just the start. In my &lt;strong&gt;Udemy course&lt;/strong&gt;, I dive deeper into:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Advanced Virtual Thread demos with Spring Boot
&lt;/li&gt;
&lt;li&gt;Debugging &lt;strong&gt;thread pinning&lt;/strong&gt; with JFR monitoring
&lt;/li&gt;
&lt;li&gt;Observability with &lt;strong&gt;Micrometer, Prometheus, Grafana&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Structured Concurrency&lt;/strong&gt; &amp;amp; &lt;strong&gt;Scoped Values&lt;/strong&gt; in real apps
&lt;/li&gt;
&lt;li&gt;Performance testing with &lt;strong&gt;JMeter&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 &lt;a href="https://www.udemy.com/course/java-virtual-threads-structured-concurrency-with-spring-boot/?couponCode=VTFREE" rel="noopener noreferrer"&gt;Java Virtual Threads &amp;amp; Structured Concurrency with Spring Boot&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🎁 Resources &amp;amp; Discounts&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;🚨 &lt;strong&gt;Need a discount coupon?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
📧 Email: &lt;strong&gt;&lt;a href="mailto:j2eeexpert2015@gmail.com"&gt;j2eeexpert2015@gmail.com&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
💬 &lt;a href="https://join.slack.com/t/learningfromexp/shared_invite/zt-1fnksxgd0-_jOdmIq2voEeMtoindhWrA" rel="noopener noreferrer"&gt;Join my student Slack community&lt;/a&gt;  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;👉 *&lt;em&gt;Browse all my discounted courses here:  *&lt;/em&gt;&lt;br&gt;
&lt;a href="https://j2eeexpert2015.github.io/learningfromexperience-courses/" rel="noopener noreferrer"&gt;Learning From Experience – Course Catalog&lt;/a&gt;  &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>java</category>
      <category>java21</category>
      <category>virtualthreads</category>
      <category>javaconcurrency</category>
    </item>
    <item>
      <title>🚀 Java 21 Virtual Threads: A Deep Dive into Mounting &amp; Unmounting</title>
      <dc:creator>Ayan Dutta</dc:creator>
      <pubDate>Sat, 13 Sep 2025 18:27:37 +0000</pubDate>
      <link>https://dev.to/mrayandutta/java-21-virtual-threads-a-deep-dive-into-mounting-unmounting-58n7</link>
      <guid>https://dev.to/mrayandutta/java-21-virtual-threads-a-deep-dive-into-mounting-unmounting-58n7</guid>
      <description>&lt;p&gt;I’ve been experimenting with Java 21’s Virtual Threads (Project Loom) in my Spring Boot apps, and the way they handle concurrency is a game-changer. The key? Understanding how mounting and unmounting work under the hood.&lt;/p&gt;

&lt;p&gt;Check out my hands-on video demo to see how it all works:&lt;br&gt;
Java Virtual Threads: Deep Dive into Mounting/Unmounting &amp;amp; Carrier Threads Explained&lt;br&gt;
👉 &lt;a href="https://youtu.be/IA0Hwwf9hTo" rel="noopener noreferrer"&gt;https://youtu.be/IA0Hwwf9hTo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🔍 Why This Matters&lt;/strong&gt;&lt;br&gt;
Platform Threads in Java are heavy, mapping 1:1 to OS threads. Virtual Threads? They’re lightweight, letting you run thousands of concurrent tasks. The catch: they rely on carrier threads in the JVM’s ForkJoinPool.&lt;/p&gt;

&lt;p&gt;When debugging my own apps, I noticed that knowing when a Virtual Thread mounts (gets assigned to a carrier thread) or unmounts (frees the carrier during blocking I/O) was critical to avoiding performance bottlenecks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📚 What You’ll Learn in the Demo&lt;/strong&gt;&lt;br&gt;
Here’s what I cover in the video:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Platform vs. Virtual Threads&lt;/strong&gt; → Key architectural differences.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ForkJoinPool Scheduler&lt;/strong&gt; → How the JVM manages carrier threads.&lt;/li&gt;
&lt;li&gt;*&lt;em&gt;Mounting *&lt;/em&gt;→ How Virtual Threads are assigned to carriers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unmounting&lt;/strong&gt; → What happens during blocking I/O operations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CPU vs. I/O Tasks&lt;/strong&gt; → Why they behave differently with Virtual Threads.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;JDK Internals&lt;/strong&gt; → Insights from real code examples.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;💡 My Key Takeaway&lt;/strong&gt;&lt;br&gt;
Here’s what clicked for me: Virtual Threads unmount automatically during blocking operations, freeing up carrier threads to handle other tasks. This is why you can scale to thousands (or even millions) of concurrent tasks without killing your server’s memory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📚 Want to Go Further?&lt;/strong&gt;&lt;br&gt;
This video is just a taste of what I’ve been exploring with Java 21 concurrency. In my full Udemy course, I dive into:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Advanced Virtual Thread demos in Spring Boot.&lt;/li&gt;
&lt;li&gt;Avoiding thread pinning pitfalls with JFR monitoring.&lt;/li&gt;
&lt;li&gt;Observability with Micrometer, Prometheus, and Grafana.&lt;/li&gt;
&lt;li&gt;Structured Concurrency and Scoped Values in real apps.&lt;/li&gt;
&lt;li&gt;Load testing with JMeter to prove it all works.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Want to dive deeper? **Check out my full Udemy course on **Java Virtual Threads &amp;amp; Structured Concurrency with Spring Boot&lt;/strong&gt;:&lt;br&gt;
👉 &lt;a href="https://www.udemy.com/course/java-virtual-threads-structured-concurrency-with-spring-boot/" rel="noopener noreferrer"&gt;https://www.udemy.com/course/java-virtual-threads-structured-concurrency-with-spring-boot/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;**&lt;br&gt;
🎁 Resources &amp;amp; Discounts**&lt;br&gt;
🚨 Need a discount coupon?&lt;br&gt;
📢 Request one via email or Slack as early as possible:&lt;br&gt;
📧 Email: &lt;a href="mailto:j2eeexpert2015@gmail.com"&gt;j2eeexpert2015@gmail.com&lt;/a&gt;&lt;br&gt;
💬 Slack: Join our student community&lt;/p&gt;

&lt;p&gt;🔗 &lt;strong&gt;Browse all my discounted courses here:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;👉&lt;a href="https://j2eeexpert2015.github.io/learningfromexperience-courses" rel="noopener noreferrer"&gt;https://j2eeexpert2015.github.io/learningfromexperience-courses&lt;/a&gt;&lt;/p&gt;

</description>
      <category>java</category>
      <category>java21</category>
      <category>virtualthreads</category>
      <category>javavirtualthreads</category>
    </item>
  </channel>
</rss>
