<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Asynchronous on IT Comparison</title><link>https://comparison.metacog.co.kr/tags/asynchronous/</link><description>Recent content in Asynchronous on IT Comparison</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sun, 06 Sep 2026 09:53:39 +0900</lastBuildDate><atom:link href="https://comparison.metacog.co.kr/tags/asynchronous/index.xml" rel="self" type="application/rss+xml"/><item><title>Synchronous vs Asynchronous: Blocking Calls vs Non-Blocking Flow</title><link>https://comparison.metacog.co.kr/posts/2026-09-06-synchronous-vs-asynchronous-blocking-calls-vs-non-blocking-f/</link><pubDate>Sun, 06 Sep 2026 09:53:39 +0900</pubDate><guid>https://comparison.metacog.co.kr/posts/2026-09-06-synchronous-vs-asynchronous-blocking-calls-vs-non-blocking-f/</guid><description>&lt;h2 id="overview"&gt;Overview&lt;/h2&gt;
&lt;p&gt;Synchronous and asynchronous describe whether a caller waits for an operation to finish before moving on. &lt;strong class="kw"&gt;Synchronous&lt;/strong&gt; execution blocks the calling thread until a result returns, while &lt;strong class="kw"&gt;asynchronous&lt;/strong&gt; execution lets the caller continue and gets notified or polls for completion later. The choice shapes throughput, resource usage, and how errors and ordering are handled throughout a system.&lt;/p&gt;
&lt;h2 id="comparison-diagram"&gt;Comparison Diagram&lt;/h2&gt;
&lt;div class="compare-diagram"&gt;
&lt;svg viewBox="0 0 640 360" xmlns="http://www.w3.org/2000/svg"&gt;&lt;text x="160" y="40" text-anchor="middle" font-size="18" style="fill:var(--primary)"&gt;Synchronous&lt;/text&gt;&lt;text x="480" y="40" text-anchor="middle" font-size="18" style="fill:var(--primary)"&gt;Asynchronous&lt;/text&gt;&lt;line x1="320" y1="20" x2="320" y2="340" style="stroke:var(--border)" stroke-width="1" stroke-dasharray="4 4"/&gt;&lt;text x="60" y="80" font-size="12" style="fill:var(--secondary)"&gt;Caller&lt;/text&gt;&lt;rect x="40" y="90" width="90" height="30" rx="4" style="fill:var(--compare-a-soft);stroke:var(--compare-a)" stroke-width="1.5"/&gt;&lt;text x="85" y="110" text-anchor="middle" font-size="11" style="fill:var(--content)"&gt;Call fn()&lt;/text&gt;&lt;line x1="130" y1="105" x2="200" y2="105" style="stroke:var(--compare-a)" stroke-width="2" marker-end="url(#arrowA)"/&gt;&lt;rect x="200" y="90" width="90" height="30" rx="4" style="fill:var(--compare-a-soft);stroke:var(--compare-a)" stroke-width="1.5"/&gt;&lt;text x="245" y="110" text-anchor="middle" font-size="11" style="fill:var(--content)"&gt;Work runs&lt;/text&gt;&lt;rect x="40" y="140" width="90" height="70" rx="4" style="fill:none;stroke:var(--compare-a)" stroke-width="1.5" stroke-dasharray="3 3"/&gt;&lt;text x="85" y="180" text-anchor="middle" font-size="11" style="fill:var(--secondary)"&gt;Caller&lt;/text&gt;&lt;text x="85" y="195" text-anchor="middle" font-size="11" style="fill:var(--secondary)"&gt;blocked&lt;/text&gt;&lt;line x1="245" y1="120" x2="245" y2="230" style="stroke:var(--compare-a)" stroke-width="1.5" stroke-dasharray="2 2"/&gt;&lt;line x1="245" y1="230" x2="130" y2="245" style="stroke:var(--compare-a)" stroke-width="2" marker-end="url(#arrowA)"/&gt;&lt;rect x="40" y="250" width="90" height="30" rx="4" style="fill:var(--compare-a-soft);stroke:var(--compare-a)" stroke-width="1.5"/&gt;&lt;text x="85" y="270" text-anchor="middle" font-size="11" style="fill:var(--content)"&gt;Result used&lt;/text&gt;&lt;text x="85" y="305" text-anchor="middle" font-size="11" style="fill:var(--secondary)"&gt;one blocking timeline&lt;/text&gt;&lt;text x="380" y="80" font-size="12" style="fill:var(--secondary)"&gt;Caller&lt;/text&gt;&lt;rect x="360" y="90" width="90" height="30" rx="4" style="fill:var(--compare-b-soft);stroke:var(--compare-b)" stroke-width="1.5"/&gt;&lt;text x="405" y="110" text-anchor="middle" font-size="11" style="fill:var(--content)"&gt;Call fn()&lt;/text&gt;&lt;line x1="450" y1="105" x2="500" y2="105" style="stroke:var(--compare-b)" stroke-width="2" marker-end="url(#arrowB)"/&gt;&lt;rect x="500" y="90" width="90" height="30" rx="4" style="fill:var(--compare-b-soft);stroke:var(--compare-b)" stroke-width="1.5"/&gt;&lt;text x="545" y="110" text-anchor="middle" font-size="11" style="fill:var(--content)"&gt;Work runs&lt;/text&gt;&lt;line x1="405" y1="120" x2="405" y2="150" style="stroke:var(--compare-b)" stroke-width="2" marker-end="url(#arrowB)"/&gt;&lt;rect x="360" y="150" width="90" height="30" rx="4" style="fill:var(--compare-b-soft);stroke:var(--compare-b)" stroke-width="1.5"/&gt;&lt;text x="405" y="170" text-anchor="middle" font-size="11" style="fill:var(--content)"&gt;Continues free&lt;/text&gt;&lt;line x1="405" y1="180" x2="405" y2="210" style="stroke:var(--compare-b)" stroke-width="2" marker-end="url(#arrowB)"/&gt;&lt;rect x="360" y="210" width="90" height="30" rx="4" style="fill:var(--compare-b-soft);stroke:var(--compare-b)" stroke-width="1.5"/&gt;&lt;text x="405" y="230" text-anchor="middle" font-size="11" style="fill:var(--content)"&gt;Other work&lt;/text&gt;&lt;line x1="545" y1="120" x2="545" y2="260" style="stroke:var(--compare-b)" stroke-width="1.5" stroke-dasharray="2 2"/&gt;&lt;line x1="545" y1="260" x2="450" y2="270" style="stroke:var(--compare-b)" stroke-width="2" marker-end="url(#arrowB)"/&gt;&lt;rect x="360" y="255" width="90" height="30" rx="4" style="fill:var(--compare-b-soft);stroke:var(--compare-b)" stroke-width="1.5"/&gt;&lt;text x="405" y="275" text-anchor="middle" font-size="11" style="fill:var(--content)"&gt;Callback fires&lt;/text&gt;&lt;text x="405" y="305" text-anchor="middle" font-size="11" style="fill:var(--secondary)"&gt;interleaved timelines&lt;/text&gt;&lt;defs&gt;&lt;marker id="arrowA" markerWidth="8" markerHeight="8" refX="6" refY="3" orient="auto"&gt;&lt;path d="M0,0 L6,3 L0,6 Z" style="fill:var(--compare-a)"/&gt;&lt;/marker&gt;&lt;marker id="arrowB" markerWidth="8" markerHeight="8" refX="6" refY="3" orient="auto"&gt;&lt;path d="M0,0 L6,3 L0,6 Z" style="fill:var(--compare-b)"/&gt;&lt;/marker&gt;&lt;/defs&gt;&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id="comparison-table"&gt;Comparison Table&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Aspect&lt;/th&gt;
&lt;th&gt;Synchronous&lt;/th&gt;
&lt;th&gt;Asynchronous&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Call initiation&lt;/td&gt;
&lt;td&gt;Caller invokes and immediately waits&lt;/td&gt;
&lt;td&gt;Caller invokes and registers a continuation, then moves on&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Thread/resource occupancy&lt;/td&gt;
&lt;td&gt;Calling thread stays occupied for the full duration&lt;/td&gt;
&lt;td&gt;Calling thread is freed while work happens elsewhere&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Execution order&lt;/td&gt;
&lt;td&gt;Strictly sequential, one step completes before the next starts&lt;/td&gt;
&lt;td&gt;Interleaved; multiple operations can be in flight concurrently&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Result delivery&lt;/td&gt;
&lt;td&gt;Return value comes directly back from the call&lt;/td&gt;
&lt;td&gt;Result delivered via callback, promise/future, or event&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Error handling&lt;/td&gt;
&lt;td&gt;Exceptions propagate up the same call stack&lt;/td&gt;
&lt;td&gt;Errors surface in the callback or rejection handler, separate from the call site&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Code structure&lt;/td&gt;
&lt;td&gt;Linear, easy to read top-to-bottom&lt;/td&gt;
&lt;td&gt;Requires callbacks, promises, or async/await to manage flow&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Debugging&lt;/td&gt;
&lt;td&gt;Stack traces map directly to the logical call path&lt;/td&gt;
&lt;td&gt;Stack traces are fragmented across event loop turns, harder to trace&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scalability under load&lt;/td&gt;
&lt;td&gt;Threads block on I/O, limiting concurrent connections per resource&lt;/td&gt;
&lt;td&gt;Single thread or few threads can handle many pending operations at once&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="key-differences"&gt;Key Differences&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong class="kw"&gt;Blocking&lt;/strong&gt; is the defining trait of synchronous calls; the caller cannot proceed until the operation resolves&lt;/li&gt;
&lt;li&gt;Asynchronous code relies on an &lt;strong class="kw"&gt;event loop&lt;/strong&gt; or scheduler to resume work when results arrive&lt;/li&gt;
&lt;li&gt;Synchronous flow gives simpler &lt;strong class="kw"&gt;stack traces&lt;/strong&gt;, while async flow gives better resource utilization&lt;/li&gt;
&lt;li&gt;Async introduces &lt;strong class="kw"&gt;race conditions&lt;/strong&gt; and ordering complexity that synchronous code avoids by construction&lt;/li&gt;
&lt;li&gt;Choosing async trades readability for the ability to handle many concurrent &lt;strong class="kw"&gt;I/O-bound&lt;/strong&gt; operations efficiently&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="when-to-use-each"&gt;When to Use Each&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Synchronous&lt;/strong&gt;&lt;/p&gt;</description></item></channel></rss>