<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Win32 on Fulgen&#39;s Blog</title>
    <link>https://blog.fulgen.dev/tags/win32/</link>
    <description>Recent content in Win32 on Fulgen&#39;s Blog</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Sat, 10 May 2025 14:45:15 +0200</lastBuildDate>
    <atom:link href="https://blog.fulgen.dev/tags/win32/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>`GetMessage().await`: The hunt for an async message loop</title>
      <link>https://blog.fulgen.dev/posts/await-getmessage/</link>
      <pubDate>Sat, 10 May 2025 14:45:15 +0200</pubDate>
      <guid>https://blog.fulgen.dev/posts/await-getmessage/</guid>
      <description>&lt;p&gt;Windows has quite decent support for asynchronous operations in its APIs. And while, as is typical for, sadly, any OS, it comes in multiple forms and fashions like &lt;code&gt;ReadFile&lt;/code&gt;&amp;rsquo;s &amp;ldquo;signal an event when done&amp;rdquo; and APCs, the ruler of them all are I/O Completion Ports, introduced in NT 3.5, 31 years ago. Unsurprisingly, it is completion based - instead of polling for when an operation has finished like the eponymous &lt;code&gt;poll&lt;/code&gt;, operations post a completion when they&amp;rsquo;re done, and the caller just has to wait for and handle completions. IOCPs are also the core of the Windows Threadpool API, where you don&amp;rsquo;t even have to deal with a port directly - you register a callback, and the system calls it for you when it dequeues the completion.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
