computer-science
Understanding the rationale behind a rule when trying to circumvent it
Key takeaways
- In the documentation for best practices for implementing process and thread-related callback functions, it calls out
- It seems that these callback functions need to operate quickly and cannot block.
- The various prohibitions above suggest that these callouts are called during the process creation/termination sequence, so if you take a long time to deal with them, you are slowing down the entire system.
In the documentation for best practices for implementing process and thread-related callback functions, it calls out
So far so good. It seems that these callback functions need to operate quickly and cannot block. These are callbacks that are invoked when a process starts or exits, when a thread starts or exits, when a DLL or EXE is loaded or unloaded, and various other low-level events.
The various prohibitions above suggest that these callouts are called during the process creation/termination sequence, so if you take a long time to deal with them, you are slowing down the entire system. And the rather extreme requirements, like Don t make registry calls, suggest that they might even be called while the system holds internal locks.
Article preview — originally published by Hacker News. Full story at the source.
Read full story on Hacker News →
More top stories
Aggregated and edited by the Scoop newsroom. We surface news from Hacker News alongside other reporting so you can compare coverage in one place.
Editorial policy · Corrections · About Scoop