<?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: Hardik</title>
    <description>The latest articles on DEV Community by Hardik (@hardik9850).</description>
    <link>https://dev.to/hardik9850</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%2F54263%2F1471f08f-89da-4443-b567-21ff4ebd5a8e.png</url>
      <title>DEV Community: Hardik</title>
      <link>https://dev.to/hardik9850</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hardik9850"/>
    <language>en</language>
    <item>
      <title>Coroutine vs JVM thread</title>
      <dc:creator>Hardik</dc:creator>
      <pubDate>Mon, 19 Jul 2021 03:44:15 +0000</pubDate>
      <link>https://dev.to/hardik9850/coroutine-vs-jvm-thread-2705</link>
      <guid>https://dev.to/hardik9850/coroutine-vs-jvm-thread-2705</guid>
      <description>&lt;p&gt;Hi there,&lt;/p&gt;

&lt;p&gt;You might have worked with kotlin's coroutine by now and possibility is, you may have an impression that it is a form of light-weight thread.&lt;/p&gt;

&lt;p&gt;I was curious to know it's internal working, how it is light-weight compared to JVM thread and any hidden advantages which I was unaware of.&lt;/p&gt;

&lt;p&gt;I dug into framework + read some articles, and wrote a &lt;a href="https://hardik9850.medium.com/jvm-threads-and-kotlin-coroutines-5b17e417bc0"&gt;blog&lt;/a&gt; where I describe how beneficial Kotlin coroutines are over JVM threads.&lt;/p&gt;

&lt;p&gt;If this concept interests you then please give it a read. I hope it is fruitful.&lt;/p&gt;

</description>
      <category>android</category>
      <category>coroutine</category>
      <category>kotlin</category>
      <category>multithreading</category>
    </item>
    <item>
      <title>Difference between a “coroutine” and a “thread”?</title>
      <dc:creator>Hardik</dc:creator>
      <pubDate>Fri, 02 Apr 2021 06:18:47 +0000</pubDate>
      <link>https://dev.to/hardik9850/answer-difference-between-a-coroutine-and-a-thread-43d9</link>
      <guid>https://dev.to/hardik9850/answer-difference-between-a-coroutine-and-a-thread-43d9</guid>
      <description>&lt;div class="ltag__stackexchange--container"&gt;
  &lt;div class="ltag__stackexchange--title-container"&gt;
    
      &lt;div class="ltag__stackexchange--title"&gt;
        &lt;h1&gt;
          &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7Gn-iPj_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/stackoverflow-logo-b42691ae545e4810b105ee957979a853a696085e67e43ee14c5699cf3e890fb4.svg" alt=""&gt;
            &lt;a href="https://stackoverflow.com/questions/1934715/difference-between-a-coroutine-and-a-thread/23436125#23436125" rel="noopener noreferrer"&gt;
              &lt;span class="title-flare"&gt;answer&lt;/span&gt; re:  Difference between a "coroutine" and a "thread"?
            &lt;/a&gt;
        &lt;/h1&gt;
        &lt;div class="ltag__stackexchange--post-metadata"&gt;
          &lt;span&gt;May  2 '14&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;a class="ltag__stackexchange--score-container" href="https://stackoverflow.com/questions/1934715/difference-between-a-coroutine-and-a-thread/23436125#23436125" rel="noopener noreferrer"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Y9mJpuJP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/stackexchange-arrow-up-eff2e2849e67d156181d258e38802c0b57fa011f74164a7f97675ca3b6ab756b.svg" alt=""&gt;
        &lt;div class="ltag__stackexchange--score-number"&gt;
          228
        &lt;/div&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wif5Zq3z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/stackexchange-arrow-down-4349fac0dd932d284fab7e4dd9846f19a3710558efde0d2dfd05897f3eeb9aba.svg" alt=""&gt;
      &lt;/a&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--body"&gt;
    
&lt;p&gt;&lt;strong&gt;First read:&lt;/strong&gt; &lt;a href="https://stackoverflow.com/questions/1050222/concurrency-vs-parallelism-what-is-the-difference"&gt;Concurrency vs Parallelism - What is the difference?&lt;/a&gt; &lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;Concurrency is the separation of tasks to provide interleaved
  execution. Parallelism is the simultaneous execution of multiple
  pieces of work in order to increase speed. —&lt;a href="https://github.com/servo/servo/wiki/Design" rel="noreferrer"&gt;https://github.com/servo/servo/wiki/Design&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; With threads, the operating system switches running threads preemptively according to…&lt;/p&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--btn--container"&gt;
    
      &lt;a href="https://stackoverflow.com/questions/1934715/difference-between-a-coroutine-and-a-thread/23436125#23436125" rel="noopener noreferrer"&gt;Open Full Answer&lt;/a&gt;
    
  &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>coroutine</category>
      <category>kotlin</category>
    </item>
  </channel>
</rss>
