0

我需要锁定我的代码的特定部分,问题如下:

我必须允许多个读取线程和单个写入线程到该部分,例如:

get readlock()
{
if(s==1)
  get writelock()

or else 
   continue with read lock()
}
4

0 回答 0