, "" , - :
, :
A. , mutex , . , . . . , .
Stream B. If the request comes for the same file, it will block the list and look for the file name contained in the list. If it is on the list, take the wait variable and wait. When the stream is signaled, take a lock on the list and see if the file is on the list (maybe another thread took a lock on the file name in front of you). If not, follow stream A. If so, take the wait variable in the new structure and wait until a message appears, and then repeat the steps above.
source
share