|
|
|
@ -250,35 +250,35 @@ private:
|
|
|
|
|
friend class hsLockForWriting; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
class hsLockForReading |
|
|
|
|
{ |
|
|
|
|
hsReaderWriterLock& fLock; |
|
|
|
|
|
|
|
|
|
public: |
|
|
|
|
hsLockForReading(hsReaderWriterLock& lock) : fLock(lock) |
|
|
|
|
{ |
|
|
|
|
fLock.LockForReading(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
class hsLockForReading |
|
|
|
|
{ |
|
|
|
|
hsReaderWriterLock& fLock; |
|
|
|
|
|
|
|
|
|
public: |
|
|
|
|
hsLockForReading(hsReaderWriterLock& lock) : fLock(lock) |
|
|
|
|
{ |
|
|
|
|
fLock.LockForReading(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
~hsLockForReading() |
|
|
|
|
{ |
|
|
|
|
fLock.UnlockForReading(); |
|
|
|
|
fLock.UnlockForReading(); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
class hsLockForWriting |
|
|
|
|
{ |
|
|
|
|
hsReaderWriterLock& fLock; |
|
|
|
|
|
|
|
|
|
public: |
|
|
|
|
hsLockForWriting(hsReaderWriterLock& lock) : fLock(lock) |
|
|
|
|
{ |
|
|
|
|
fLock.LockForWriting(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
class hsLockForWriting |
|
|
|
|
{ |
|
|
|
|
hsReaderWriterLock& fLock; |
|
|
|
|
|
|
|
|
|
public: |
|
|
|
|
hsLockForWriting(hsReaderWriterLock& lock) : fLock(lock) |
|
|
|
|
{ |
|
|
|
|
fLock.LockForWriting(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
~hsLockForWriting() |
|
|
|
|
{ |
|
|
|
|
fLock.UnlockForWriting(); |
|
|
|
|
fLock.UnlockForWriting(); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|