如果使用者线程的运行速度更快,则当使用者等待添加新项时,您会注意到阻塞功能。
If the consumer runs faster, you will notice the blocking functionality as the consumer waits for a new item to be added.
第一个线程锁住互斥并把数据添加到队列中,而其他线程等待轮到它们操作。
The first thread locks the mutex and appends data to the queue, while the other threads wait for their turn.
因为您可以继续操作,将艺术家添加到表中,而不用等待服务器响应。
That's because you go ahead and add the artist to your table without waiting for the server.
应用推荐