Dagens Spørsmål & Svar-sesjon kommer til oss med høflighet av SuperUser-en underavdeling av Stack Exchange, en fellesskapsdrevet gruppering av Q & A-nettsteder.
Foto courtesy of Matthias Ripp (Flickr).
Spørsmålet
SuperUser leser ArunPrasanth vil vite hvordan Windows vet at et program ikke svarer:
How does Windows know if a program is not responding? Does it constantly poll all running applications?
Hvordan vet Windows om programmene ikke svarer?
Svaret
SuperUser bidragsyter ratchet freak har svaret for oss:
An application gets events from a queue provided by Windows. If the application does not poll the event queue for a while (5 seconds), such as doing a long calculation for example, then Windows assumes that the application is hung and alerts the user.
To avoid that, applications should push expensive calculations to worker threads or split up processing and make sure the queue gets polled regularly.
Har du noe å legge til forklaringen? Lyder av i kommentarene. Vil du lese flere svar fra andre tech-savvy Stack Exchange-brukere? Sjekk ut hele diskusjonstråden her.