<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
    <channel>
        <title>Concurrency - Tag - ThanhLD Site</title>
        <link>https://ducthanh98.github.io/tags/concurrency/</link>
        <description>Concurrency - Tag - ThanhLD Site</description>
        <generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Mon, 15 Jan 2024 10:00:00 &#43;0700</lastBuildDate><atom:link href="https://ducthanh98.github.io/tags/concurrency/" rel="self" type="application/rss+xml" /><item>
    <title>Python Core: Context Managers, Generators &amp; GIL</title>
    <link>https://ducthanh98.github.io/posts/python/</link>
    <pubDate>Mon, 15 Jan 2024 10:00:00 &#43;0700</pubDate>
    <author>ThanhLD</author>
    <guid>https://ducthanh98.github.io/posts/python/</guid>
    <description><![CDATA[Context Managers Context Manager giúp quản lý tài nguyên tự động, đảm bảo tài nguyên (file, database connection, network socket,&hellip;) được mở và đóng đúng cách. Đóng tài nguyên tự động, tránh lỗi quên close() Xử lý lỗi tự động, giảm code try-except-finally class FileManager: def __init__(self, filename): self.filename = filename def __enter__(self): self.file = open(self.filename, &#34;r&#34;) # Mở file return self.file # Trả về file để sử dụng trong `with` def __exit__(self, exc_type, exc_value, traceback): self.]]></description>
</item>
<item>
    <title>Golang Deep Dive: Concurrency, Runtime &amp; Architecture</title>
    <link>https://ducthanh98.github.io/posts/golang/</link>
    <pubDate>Sat, 23 Dec 2023 09:40:49 &#43;0700</pubDate>
    <author>ThanhLD</author>
    <guid>https://ducthanh98.github.io/posts/golang/</guid>
    <description><![CDATA[In-depth technical notes on Go concurrency, memory management, garbage collection internals, performance profiling, hexagonal architecture, and design patterns.
Concurrency &amp; Channels Channel Types 1. Unbuffered Channel Behavior: An unbuffered channel has zero capacity (make(chan int)). Synchronization: Requires both sender and receiver to be ready at the exact same moment. Send blocks until a receiver is ready, and receive blocks until a sender is ready. Use Case: Strict point-to-point synchronization between goroutines.]]></description>
</item>
</channel>
</rss>
