Današnja pitanja i odgovori nam se javljaju zahvaljujući SuperUseru - podjele Stack Exchange-a, zajednice-driven grupiranja Q & A web stranica.
Fotografija ljubaznošću Matthias Ripp (Flickr).
Pitanje
SuperUser čitač ArunPrasanth želi znati kako Windows zna da program ne reagira:
How does Windows know if a program is not responding? Does it constantly poll all running applications?
Kako Windows zna da programi ne reagiraju?
Odgovor
Odgovor za nas:
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.
Imate li nešto za objašnjenje? Zvuči u komentarima. Želite li pročitati više odgovora od drugih tehnoloških korisnika Stack Exchangea? Pogledajte ovdje cijelu raspravu.