mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-26 10:32:56 +01:00
Moved work for isue 532 into it's own branch.
This commit is contained in:
@@ -43,7 +43,20 @@ private:
|
||||
};
|
||||
|
||||
|
||||
typedef MutexImpl FastMutexImpl;
|
||||
class Foundation_API FastMutexImpl
|
||||
{
|
||||
protected:
|
||||
FastMutexImpl();
|
||||
~FastMutexImpl();
|
||||
void lockImpl();
|
||||
bool tryLockImpl();
|
||||
bool tryLockImpl(long milliseconds);
|
||||
void unlockImpl();
|
||||
|
||||
private:
|
||||
CRITICAL_SECTION _cs;
|
||||
int _lockCount;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
@@ -81,6 +94,13 @@ inline void MutexImpl::unlockImpl()
|
||||
}
|
||||
|
||||
|
||||
inline void FastMutexImpl::unlockImpl()
|
||||
{
|
||||
--_lockCount;
|
||||
LeaveCriticalSection(&_cs);
|
||||
}
|
||||
|
||||
|
||||
} // namespace Poco
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user