TL;DR
Developers often attempt to bypass system callback rules by blocking or synchronizing, believing it offers a loophole. Experts warn this undermines system stability and violates core design principles.
Developers and drivers attempting to bypass Windows system callback rules by blocking or synchronizing during callback execution are violating core design principles, risking system stability and deadlocks, despite following the letter of the rules.
According to official Microsoft documentation, callback functions invoked during process or thread start and end must operate quickly and avoid blocking, IPC, registry calls, or synchronization. These rules are designed to prevent system hangs and deadlocks, especially since callbacks may be called during critical system operations with internal locks held.
However, some driver developers interpret these rules narrowly, queuing work to System Worker Threads and then waiting synchronously for that work to complete. This practice appears to follow the guidelines superficially but violates the core intent—namely, that callbacks should not block or wait, as doing so can cause system stalls or deadlocks.
Recent updates in 2020 clarified that waiting on work queued to System Worker Threads defeats the purpose of asynchronous processing, yet some vendors interpret the rules as permitting such synchronization, leading to system stability issues. Experts describe this as a form of ‘loophole’ or ‘excuse,’ where developers claim they’re not directly blocking, but their actions have the same effect.
Risks of Bypassing Callback Rules in Driver Development
This practice can lead to system hangs, deadlocks, and degraded performance, especially in critical system components like drivers. Understanding the rationale behind the rules is essential for developers to prevent stability issues and avoid violating core system design principles.

HiLetgo USB Logic Analyzer Device with EMI Ferrite Ring USB Cable 24MHz 8CH 24MHz 8 Channel UART IIC SPI Debug
The logic for each channel sampling rate of 24M/s. General applications around 10M, enough to cope with a…
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Background on Windows Callback Best Practices
Microsoft’s documentation emphasizes that callback routines related to process and thread management must be short and non-blocking, as they are invoked during sensitive system operations. These guidelines have been in place for years, with updates in 2020 explicitly warning against waiting on work queues within callbacks.
Despite this, some developers have historically interpreted the rules as allowing synchronous waits, believing that offloading work to worker threads and then waiting is acceptable. This misinterpretation can introduce reentrancy issues and deadlocks, especially when internal system locks are held during callback execution.
“The callback function must perform its work quickly without blocking. If you need to do complex work or synchronize with other threads or processes, do the work asynchronously, such as by using System Worker Threads.”
— an anonymous researcher

Manalete Thread Checker, 55 Nut and Bolt Thread Checker, Screw Size and Thread Identifier Gauge with 19 Standard & 17 Metric &19 Drill Bit Gauges, Bolt Size Finder for Quickly Identify Thread Sizes
Precision Thread Checker Tool: Our nut and bolt thread checker quickly identifies 30 different sizes of bolts and…
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Unclear Boundaries Between Allowed and Forbidden Practices
It remains unclear how widely this misinterpretation persists among driver developers and whether new guidelines are effectively communicating the risks. The extent of system stability issues caused by this practice has not been fully quantified.

6 Stages of Debugging Programmer Computer Funny Software T-Shirt
Programmer present idea with funny saying for developer, or coder who loves programming, coding. Cool geek apparel in…
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Enforcing Best Practices and Clarifying Rules for Developers
Microsoft is expected to continue updating documentation and developer guidance to clarify that waiting on work in callback routines is prohibited. Industry experts recommend stricter enforcement and testing to prevent such practices from causing system instability.

SHEGOTO CPU Socket Tester for AM5 CPU Socket Testing Board Diagnostic Tool for Desktop with LED Display and High Stability
Optimizes your testing accuracy with the Desktop CPU Socket Tester, design specifically for seamlessly compatibility for AM5 platforms…
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Key Questions
Why is blocking in callback functions dangerous?
Blocking in callback functions can cause system hangs, deadlocks, and performance issues because these callbacks are invoked during critical system operations where internal locks may be held.
Can queuing work to a System Worker Thread be safe?
Yes, if the callback queues work asynchronously and does not wait for its completion. Waiting synchronously defeats the purpose and can cause deadlocks.
What are the official guidelines for callback functions?
They should be short, non-blocking, and avoid calling into services or performing synchronization. If complex work is needed, it should be offloaded asynchronously without waiting for completion within the callback.
Has Microsoft updated its documentation on this issue?
Yes, in 2020, Microsoft clarified that waiting on work queued to System Worker Threads within callbacks is not allowed and can cause system instability.
Source: Hacker News