▍A simple example for multithreading and semaphore
This example implements a reading room model.Suppose there are 8 seats in the reading room and 5 seats in the waiting room.The readers' action will be like this:1) A reader registers his information in the front desk before he enters the reading room. He logs out after he leaves. The front desk can...