<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>threads &amp;mdash;   christova  </title>
    <link>https://christova.writeas.com/tag:threads</link>
    <description>&lt;b&gt;&lt;h3&gt;Tech Articles&lt;/h3&gt;&lt;/b&gt;&lt;br/&gt;&lt;b&gt;Collated from various sources. Full copyright remains with original authors.&lt;/b&gt;</description>
    <pubDate>Fri, 08 May 2026 19:58:50 +0000</pubDate>
    <item>
      <title>20 Must-Know Concurrency Concepts</title>
      <link>https://christova.writeas.com/20-must-know-concurrency-concepts?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[&#xA;&#xA;#concurrency #threads #thread-safe #queue #locks &#xA;&#xA;1\. Concurrency Overview: https://lnkd.in/gbXNtx8i&#xA;2\. Concurrency vs Parallelism: https://lnkd.in/ggm3zxKi&#xA;3\. Processes vs Threads: https://lnkd.in/gjD7BE9D&#xA;4\. Thread Lifecycle: https://lnkd.in/gnraugyb&#xA;5\. Race Conditions: https://lnkd.in/gJBaBWa5&#xA;6\. Mutex: https://lnkd.in/gU-6SvJh&#xA;7\. Semaphores: https://lnkd.in/gpcMAvvC&#xA;8\. Condition Variables: https://lnkd.in/gzD3RdWy&#xA;9\. Coarse-grained vs Fine-grained Locking: https://lnkd.in/giHCvjbK&#xA;10\. Reentrant Locks: https://lnkd.in/gjjtEZrm&#xA;11\. Try-Lock: https://lnkd.in/gc9Frvik&#xA;12\. Compare-and-Swap (CAS): https://lnkd.in/gzzvSWW&#xA;13\. Deadlock: https://lnkd.in/gKtDZ9gD&#xA;14\. Livelock: https://lnkd.in/g8UTb86c&#xA;15\. Signaling Pattern: https://lnkd.in/gg8RxZBf&#xA;16\. Thread Pool Pattern: https://lnkd.in/g52TJUT3&#xA;17\. Producer-Consumer Pattern: https://lnkd.in/g9PRh-6&#xA;18\. Reader-Writer Pattern: https://lnkd.in/geAvZkRy&#xA;19\. Thread-Safe Cache: https://lnkd.in/gPW9JnkH&#xA;20\. Thread-Safe Blocking Queue: https://lnkd.in/gtKrDJiE]]&gt;</description>
      <content:encoded><![CDATA[<p><img src="https://i.snap.as/L5UURTQ5.jpg" alt=""/></p>

<p><a href="https://christova.writeas.com/tag:concurrency" class="hashtag"><span>#</span><span class="p-category">concurrency</span></a> <a href="https://christova.writeas.com/tag:threads" class="hashtag"><span>#</span><span class="p-category">threads</span></a> <a href="https://christova.writeas.com/tag:thread" class="hashtag"><span>#</span><span class="p-category">thread</span></a>-safe <a href="https://christova.writeas.com/tag:queue" class="hashtag"><span>#</span><span class="p-category">queue</span></a> <a href="https://christova.writeas.com/tag:locks" class="hashtag"><span>#</span><span class="p-category">locks</span></a></p>

<p>1. Concurrency Overview: <strong><a href="https://www.linkedin.com/safety/go/?url=https%3A%2F%2Flnkd%2Ein%2FgbXNtx8i&amp;urlhash=9VyX&amp;mt=jC9X8_1pMX-UZbh9saFIBhjXYg_jkypW2Sh_PcD4SESYR0kFGUock2oTutMMRFMhiRPKhZK06qQRtUanZBVIGfML9FWe43uf4Avzti47d-eep9OKXhhxXbewIQ&amp;isSdui=true">https://lnkd.in/gbXNtx8i</a></strong>
2. Concurrency vs Parallelism: <strong><a href="https://www.linkedin.com/safety/go/?url=https%3A%2F%2Flnkd%2Ein%2Fggm3zxKi&amp;urlhash=hawW&amp;mt=SBiB-J977LzWgsLuhywqhqqpmntQiPf9vZZLeVhIIhU6fJlFVaBwvZB9KdNWbfO64j0iT-4fcvQBBmGG8y8S_wBAOVRkpU49SDCHNC9TBLMNfcuwZJA_63UVNg&amp;isSdui=true">https://lnkd.in/ggm3zxKi</a></strong>
3. Processes vs Threads: <strong><a href="https://www.linkedin.com/safety/go/?url=https%3A%2F%2Flnkd%2Ein%2FgjD7BE9D&amp;urlhash=wsq3&amp;mt=TRMtrIuhpoU_ak0G-KLBi_ecKIulyHask8HaFkoon9MHuvBpQsnZgIprijk3CJ75Y1C_HAN57wRoDiow4o488COWisBSSVUGlw2Z22aUz74JGpCUqVI4POwkyQ&amp;isSdui=true">https://lnkd.in/gjD7BE9D</a></strong>
4. Thread Lifecycle: <strong><a href="https://www.linkedin.com/safety/go/?url=https%3A%2F%2Flnkd%2Ein%2Fgnraugyb&amp;urlhash=K66g&amp;mt=CFxn1Jnv-pggntJRhjLyl5gD5YHu_ClrUGH4Lj9GP5pp0dB5h0ykoZzcgLxd58ylsVYB4Rd8Y9O0e3YZzCDtypacCVSQIEDMS8plCi3L0ixzITH2VEN0lBM4Gg&amp;isSdui=true">https://lnkd.in/gnraugyb</a></strong>
5. Race Conditions: <strong><a href="https://www.linkedin.com/safety/go/?url=https%3A%2F%2Flnkd%2Ein%2FgJBaBWa5&amp;urlhash=i46a&amp;mt=LPO-0EDd-4iUXqPKbZTN-0V9Bv7ZtdupXrHjlcf75fFOLVA4WO2nybLaIDhqwUQyrGacPSMonPmgazWMqo4RgGwKfq6NJAQO4UWpgehZSNf-XWElbfR7MBm25g&amp;isSdui=true">https://lnkd.in/gJBaBWa5</a></strong>
6. Mutex: <strong><a href="https://www.linkedin.com/safety/go/?url=https%3A%2F%2Flnkd%2Ein%2FgU-6SvJh&amp;urlhash=iezH&amp;mt=uZEQ2qY7QWzM1qYfdNd6FkeoegSoJRWt2fBywxhs5-bndwPUYPGhPW7off7b7jX1UPxpznOpiIG3xCok9DlLZClyG_ya-IjKG-9Z_BebAVOhcudrHM49nDfwGg&amp;isSdui=true">https://lnkd.in/gU-6SvJh</a></strong>
7. Semaphores: <strong><a href="https://www.linkedin.com/safety/go/?url=https%3A%2F%2Flnkd%2Ein%2FgpcMAvvC&amp;urlhash=ZeHJ&amp;mt=jE5dWhrwWPLaIq7-EA4vL0Z7wJGFpokuMCj93kASEjYp16xuTPcgZPN5aDIB9kZiQxmjg8780SU4jcEhU4mrvhYklm73PxpIz2Xd6sAe27AkJ43Yg2U55UlYuA&amp;isSdui=true">https://lnkd.in/gpcMAvvC</a></strong>
8. Condition Variables: <strong><a href="https://www.linkedin.com/safety/go/?url=https%3A%2F%2Flnkd%2Ein%2FgzD3RdWy&amp;urlhash=XmC6&amp;mt=QdsHEq9ZT0cyZKPNxBIJm7qZQggn7G7fs7Ofwugu9Xc1QRI7UMaOsM9b9zNn1hcWgqzJuJk4dDJ8WrsuEX-A1K0itTzS5_xzfzcT3BWqMJUo67HYwRDxFgRs2w&amp;isSdui=true">https://lnkd.in/gzD3RdWy</a></strong>
9. Coarse-grained vs Fine-grained Locking: <strong><a href="https://www.linkedin.com/safety/go/?url=https%3A%2F%2Flnkd%2Ein%2FgiHCvjbK&amp;urlhash=EnS1&amp;mt=qZ0kuTZYfqgDScClda9EzhRF1O9t5Bc-zTj_btCOHCaqXGSyZjnfwyWOUYjVXdTZp3G37A3qyIWAUTdEH46sdLbFKQajz0W1FO4xdKEtQg_ldD837pOb7YiKHQ&amp;isSdui=true">https://lnkd.in/giHCvjbK</a></strong>
10. Reentrant Locks: <strong><a href="https://www.linkedin.com/safety/go/?url=https%3A%2F%2Flnkd%2Ein%2FgjjtEZrm&amp;urlhash=g7j1&amp;mt=UW9_7gjVFxXLaW1rHbalCv88AqVaEX7daRVce8fbnqtsO_T26jRXLSYAm8DDzrep0n9qdOhfdCQENM_UrcDKygLoCIVsNzqFmi1p6RWLGAtuutENcmK1b2nnug&amp;isSdui=true">https://lnkd.in/gjjtEZrm</a></strong>
11. Try-Lock: <strong><a href="https://www.linkedin.com/safety/go/?url=https%3A%2F%2Flnkd%2Ein%2Fgc9Frvik&amp;urlhash=_-UN&amp;mt=82C8ygzGqevz1G8olY3TozqPxf6jByCxQd7ClvkKQ9te8OpTxjKQD6gxO3W97LDNIo5T2rjqHTr2LIWEAArt4Se3VtrxoZ_Ty7B4UiaKxVGOjJPVeRqaFJ8mEg&amp;isSdui=true">https://lnkd.in/gc9Frvik</a></strong>
12. Compare-and-Swap (CAS): <strong><a href="https://www.linkedin.com/safety/go/?url=https%3A%2F%2Flnkd%2Ein%2FgzzvSW_W&amp;urlhash=VR8h&amp;mt=GunmSaV1l9fTNYWSjZXcTJ09-ip0FSMuPtuTZXArsBMa6sgZncPLnxHiUFHhUOKjFQMMyz29hSwwzIg-UXGbmzoKcW7lgEYjk0Ao3CWc1in9aaxOGcA9rNfzpw&amp;isSdui=true">https://lnkd.in/gzzvSW_W</a></strong>
13. Deadlock: <strong><a href="https://www.linkedin.com/safety/go/?url=https%3A%2F%2Flnkd%2Ein%2FgKtDZ9gD&amp;urlhash=XBVs&amp;mt=lEsOCjwgnTi0WF1nc-kLijiUQzVvrstG4IAuBkjHm0xLzdEvkj2StItQ6ep9aJvs4kXXyomZddpdopisrZngxKklM9bD7jp00gXh5TtWe91gELzafhk2VWWi-Q&amp;isSdui=true">https://lnkd.in/gKtDZ9gD</a></strong>
14. Livelock: <strong><a href="https://www.linkedin.com/safety/go/?url=https%3A%2F%2Flnkd%2Ein%2Fg8UTb86c&amp;urlhash=7xwL&amp;mt=9PoXipZSxHRrl8rA-u_2pK65BfwKM-0LGHHSXPesZtgLqKhWOz2pX_1Db_Nopu-79jAyfUmX0ORIhAg0LhCaSeo8RFPQdtMprQLMsZ676-p7qoHaNfPsa1B2QQ&amp;isSdui=true">https://lnkd.in/g8UTb86c</a></strong>
15. Signaling Pattern: <strong><a href="https://www.linkedin.com/safety/go/?url=https%3A%2F%2Flnkd%2Ein%2Fgg8RxZBf&amp;urlhash=9mCm&amp;mt=5y4ZcinzCEm5WDiHhQ_eKM1atRAf3jwFO9KOKkO7yh8ceyrWgejHT3vKFsZ-Guwy7j4NGGQl5vCuqZ5RSEg1feQpKjg3-moLbL8oVzcIJHApoyAwbB_YeQwCjA&amp;isSdui=true">https://lnkd.in/gg8RxZBf</a></strong>
16. Thread Pool Pattern: <strong><a href="https://www.linkedin.com/safety/go/?url=https%3A%2F%2Flnkd%2Ein%2Fg52TJUT3&amp;urlhash=56D6&amp;mt=vy11LY8wFM7xDd06ZBzYeRFaQRBnkvo4hSF64x5m6Rsl-sQVqi7YuzgraZ65Bu97FtMuorpSMdgHvTNHFLg1BFTddPYcmtfnkLa-cA-d4_mWdQsfx02EL7UQ8Q&amp;isSdui=true">https://lnkd.in/g52TJUT3</a></strong>
17. Producer-Consumer Pattern: <strong><a href="https://www.linkedin.com/safety/go/?url=https%3A%2F%2Flnkd%2Ein%2Fg9P_Rh-6&amp;urlhash=fBA3&amp;mt=M_IMDn5biGLrVBoMixrqzmLD58mpcXiwMr7-haDdUcXWkQbrPu9RaxwS76BmRj21ZxsO0PxJHky3IOR3StCZVTyyXWbdWLZznx-m2O_J1mniTctm07ZjDIlqVQ&amp;isSdui=true">https://lnkd.in/g9P_Rh-6</a></strong>
18. Reader-Writer Pattern: <strong><a href="https://www.linkedin.com/safety/go/?url=https%3A%2F%2Flnkd%2Ein%2FgeAvZkRy&amp;urlhash=TorE&amp;mt=IGmI1-JK-oS2gyso7WMAMnHvRT55CdEXIQsmHkfaXlBQY499YEKgwzxtj8jdAiCKM1WpbxKcx57rO7FqEOsURlyFZj3-th5PcjFb61jCt-V8m_k2_fMaosyaSQ&amp;isSdui=true">https://lnkd.in/geAvZkRy</a></strong>
19. Thread-Safe Cache: <strong><a href="https://www.linkedin.com/safety/go/?url=https%3A%2F%2Flnkd%2Ein%2FgPW9JnkH&amp;urlhash=s86w&amp;mt=wCq8748YY9EBYD6Y--9srxiQxD1Ga-Qz71FLFIKDaTs3Fe_EJ1sgnZgfq4hDcYJgOzitRDOMgoMdfbn2YqseUdt3T3I9ExnZ1vwaizH6HLUKJu2He0LYLkpF-w&amp;isSdui=true">https://lnkd.in/gPW9JnkH</a></strong>
20. Thread-Safe Blocking Queue: <strong><a href="https://www.linkedin.com/safety/go/?url=https%3A%2F%2Flnkd%2Ein%2FgtKrDJiE&amp;urlhash=7SMp&amp;mt=ke4BfJOWsAvduFrTg67pgAPpVtgM047JbXd5wa8ORUYFwW5p1eJmtaJOs9kGYtL0SLsOmtBrXyz-DRJIWo7GBTTEha6EZBSf-kCJn4hIX6FBEy1nDAh0rho8Tg&amp;isSdui=true">https://lnkd.in/gtKrDJiE</a></strong></p>
]]></content:encoded>
      <guid>https://christova.writeas.com/20-must-know-concurrency-concepts</guid>
      <pubDate>Tue, 21 Apr 2026 12:58:00 +0000</pubDate>
    </item>
    <item>
      <title>Thread-Safe Immutable Classes</title>
      <link>https://christova.writeas.com/thread-safe-immutable-classes?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[Why immutable classes are thread-safe in Java:&#xA;&#xA;#java #threads #ImmutableClasses #ThreadSafe]]&gt;</description>
      <content:encoded><![CDATA[<p>Why immutable classes are thread-safe in Java:</p>

<p><img src="https://i.snap.as/fEHzCHno.jpg" alt=""/></p>

<p><a href="https://christova.writeas.com/tag:java" class="hashtag"><span>#</span><span class="p-category">java</span></a> <a href="https://christova.writeas.com/tag:threads" class="hashtag"><span>#</span><span class="p-category">threads</span></a> <a href="https://christova.writeas.com/tag:ImmutableClasses" class="hashtag"><span>#</span><span class="p-category">ImmutableClasses</span></a> <a href="https://christova.writeas.com/tag:ThreadSafe" class="hashtag"><span>#</span><span class="p-category">ThreadSafe</span></a></p>
]]></content:encoded>
      <guid>https://christova.writeas.com/thread-safe-immutable-classes</guid>
      <pubDate>Wed, 11 Mar 2026 09:48:25 +0000</pubDate>
    </item>
    <item>
      <title>Top 6 Multithreading Design Patterns</title>
      <link>https://christova.writeas.com/top-6-multithreading-design-patterns?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[&#xA;&#xA;Multithreading enables a single program or process to execute multiple tasks concurrently. Each task is a thread. Think of threads as lightweight units of execution that share the resources of the process such as memory space.&#xA;&#xA;However, multithreading also introduces complexities like synchronization, communication, and potential race conditions. This is where patterns help.&#xA;&#xA;Producer-Consumer Pattern&#xA;&#xA;This pattern involves two types of threads: producers generating data and consumers processing that data. A blocking queue acts as a buffer between the two.&#xA;&#xA;Thread Pool Pattern&#xA;&#xA;In this pattern, there is a pool of worker threads that can be reused for executing tasks. Using a pool removes the overhead of creating and destroying threads. Great for executing a large number of short-lived tasks.&#xA;&#xA;Futures and Promises Pattern&#xA;&#xA;In this pattern, the promise is an object that holds the eventual results and the future provides a way to access the result. This is great for executing long-running operations concurrently without blocking the main thread.&#xA;&#xA;Monitor Object Pattern&#xA;&#xA;Ensures that only one thread can access or modify a shared resource within an object at a time. This helps prevent race conditions. The pattern is required when you need to protect shared data or resources from concurrent access.&#xA;&#xA;Barrier Pattern&#xA;&#xA;Synchronizes a group of threads. Each thread executes until it reaches a barrier point in the code and blocks until all threads have reached the same barrier. Ideal for parallel tasks that need to reach a specific stage before starting the next stage.&#xA;&#xA;Read-Write Lock Pattern&#xA;&#xA;It allows multiple threads to read from a shared resource but only allows one thread to write to it at a time. Ideal for managing shared resources where reads are more frequent than writes.&#xA;&#xA;#Threads #Multithreading #DesignPatterns]]&gt;</description>
      <content:encoded><![CDATA[<p><img src="https://assets.bytebytego.com/diagrams/0381-top-6-multithreading-design-patterns-you-must-know.png" alt=""/></p>

<p>Multithreading enables a single program or process to execute multiple tasks concurrently. Each task is a thread. Think of threads as lightweight units of execution that share the resources of the process such as memory space.</p>

<p>However, multithreading also introduces complexities like synchronization, communication, and potential race conditions. This is where patterns help.</p>

<h2 id="producer-consumer-pattern" id="producer-consumer-pattern"><strong>Producer-Consumer Pattern</strong></h2>

<p>This pattern involves two types of threads: producers generating data and consumers processing that data. A blocking queue acts as a buffer between the two.</p>

<h2 id="thread-pool-pattern" id="thread-pool-pattern"><strong>Thread Pool Pattern</strong></h2>

<p>In this pattern, there is a pool of worker threads that can be reused for executing tasks. Using a pool removes the overhead of creating and destroying threads. Great for executing a large number of short-lived tasks.</p>

<h2 id="futures-and-promises-pattern" id="futures-and-promises-pattern"><strong>Futures and Promises Pattern</strong></h2>

<p>In this pattern, the promise is an object that holds the eventual results and the future provides a way to access the result. This is great for executing long-running operations concurrently without blocking the main thread.</p>

<h2 id="monitor-object-pattern" id="monitor-object-pattern"><strong>Monitor Object Pattern</strong></h2>

<p>Ensures that only one thread can access or modify a shared resource within an object at a time. This helps prevent race conditions. The pattern is required when you need to protect shared data or resources from concurrent access.</p>

<h2 id="barrier-pattern" id="barrier-pattern"><strong>Barrier Pattern</strong></h2>

<p>Synchronizes a group of threads. Each thread executes until it reaches a barrier point in the code and blocks until all threads have reached the same barrier. Ideal for parallel tasks that need to reach a specific stage before starting the next stage.</p>

<h2 id="read-write-lock-pattern" id="read-write-lock-pattern"><strong>Read-Write Lock Pattern</strong></h2>

<p>It allows multiple threads to read from a shared resource but only allows one thread to write to it at a time. Ideal for managing shared resources where reads are more frequent than writes.</p>

<p><a href="https://christova.writeas.com/tag:Threads" class="hashtag"><span>#</span><span class="p-category">Threads</span></a> <a href="https://christova.writeas.com/tag:Multithreading" class="hashtag"><span>#</span><span class="p-category">Multithreading</span></a> <a href="https://christova.writeas.com/tag:DesignPatterns" class="hashtag"><span>#</span><span class="p-category">DesignPatterns</span></a></p>
]]></content:encoded>
      <guid>https://christova.writeas.com/top-6-multithreading-design-patterns</guid>
      <pubDate>Mon, 01 Sep 2025 13:44:13 +0000</pubDate>
    </item>
    <item>
      <title>Multithreading Patterns</title>
      <link>https://christova.writeas.com/multithreading-patterns?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[&#xA;&#xA;#MultiThreading #threads #DesignPatterns]]&gt;</description>
      <content:encoded><![CDATA[<p><img src="https://i.snap.as/fuCWVUWj.png" alt=""/></p>

<p><a href="https://christova.writeas.com/tag:MultiThreading" class="hashtag"><span>#</span><span class="p-category">MultiThreading</span></a> <a href="https://christova.writeas.com/tag:threads" class="hashtag"><span>#</span><span class="p-category">threads</span></a> <a href="https://christova.writeas.com/tag:DesignPatterns" class="hashtag"><span>#</span><span class="p-category">DesignPatterns</span></a></p>
]]></content:encoded>
      <guid>https://christova.writeas.com/multithreading-patterns</guid>
      <pubDate>Tue, 10 Dec 2024 19:35:31 +0000</pubDate>
    </item>
  </channel>
</rss>