What are the practical uses of semaphores?
问题 Nonbinary ones.. I have never encountered a problem that required me to use a semaphore instead of mutex. So is this mostly theoretical construct, or real sw like Office, Firefox have places where they use it? If so what are the common use patterns for semaphores? 回答1: I think you already know what a semaphore is and you are just wondering how it is used on "real software". "real sw like Office, Firefox have places where they use it?" Yes, "real software" use semaphores a lot, it is not just