Stroika Library
3.0d16
Help-Home
Loading...
Searching...
No Matches
AbortableMutex.cpp
1
/*
2
* Copyright(c) Sophist Solutions, Inc. 1990-2025. All rights reserved
3
*/
4
#include "Stroika/Foundation/StroikaPreComp.h"
5
6
#include "Stroika/Foundation/Common/StroikaConfig.h"
7
#include "
Stroika/Foundation/Execution/Thread.h
"
8
9
#include "AbortableMutex.h"
10
11
using namespace
Stroika::Foundation
;
12
using namespace
Stroika::Foundation::Execution
;
13
14
/*
15
********************************************************************************
16
******************************** AbortableMutex ********************************
17
********************************************************************************
18
*/
19
void
AbortableMutex::lock
()
20
{
21
while
(not fM_.try_lock_for (chrono::milliseconds{10})) {
22
Thread::CheckForInterruption
();
23
}
24
}
25
26
void
AbortableMutex::unlock ()
27
{
28
fM_.unlock ();
29
}
Thread.h
Stroika::Foundation::Execution::AbortableMutex::lock
nonvirtual void lock()
Definition
AbortableMutex.cpp:19
Stroika::Foundation::Execution::Thread::CheckForInterruption
void CheckForInterruption()
Definition
Thread.cpp:1143
Stroika::Foundation::Execution
Definition
SDKString.inl:7
Stroika::Foundation
Definition
BloomFilter.h:22
Library
Sources
Stroika
Foundation
Execution
AbortableMutex.cpp
Generated by
1.9.8