Stroika Library 3.0d16
 
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"
8
9#include "AbortableMutex.h"
10
11using namespace Stroika::Foundation;
12using namespace Stroika::Foundation::Execution;
13
14/*
15 ********************************************************************************
16 ******************************** AbortableMutex ********************************
17 ********************************************************************************
18 */
20{
21 while (not fM_.try_lock_for (chrono::milliseconds{10})) {
23 }
24}
25
26void AbortableMutex::unlock ()
27{
28 fM_.unlock ();
29}