Spurious wakeup

In the multithreaded programming it is very common to create a structure where a thread waits signals from another one. An example can be a program with a graphic interface: the graphic thread, used to manage user inputs, can be blocked while another thread downloads information from a server (that’s not the correct way to handle it, but it is helpful to understood the process).
What if the graphic thread is waked up without a reason? more

Little bites of Cocoa is a site recently created by Jake Marsh that provides daily Cocoa tip in a simple and clear manner. Give it a try and don’t forget to follow him (of course, I do).