SiddiqSoft.RWLContainer
1.1.2
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package SiddiqSoft.RWLContainer --version 1.1.2
NuGet\Install-Package SiddiqSoft.RWLContainer -Version 1.1.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SiddiqSoft.RWLContainer" Version="1.1.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SiddiqSoft.RWLContainer --version 1.1.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SiddiqSoft.RWLContainer, 1.1.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SiddiqSoft.RWLContainer as a Cake Addin #addin nuget:?package=SiddiqSoft.RWLContainer&version=1.1.2 // Install SiddiqSoft.RWLContainer as a Cake Tool #tool nuget:?package=SiddiqSoft.RWLContainer&version=1.1.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
RWLContainer : Reader-writer protected container
Objective
- Avoid re-implementing the rw-lock; standard C++ (since C++14) has a good reader-writer lock implementation.
- Provide a simple, convenience layer for dictionary containers.
- The storage type is a
std::shared_ptr<>
Requirements
- You must be able to use
<shared_mutex>
and<mutex>
. - Minimal target is
C++17
. - The build and tests are for Visual Studio 2019 under x64.
- We use
nlohmann::json
only in our tests and the library is aware to provide a conversion operator if library is detected.
Usage
- Use the nuget SiddiqSoft.RWLContainer
- Copy paste..whatever works.
#include "gtest/gtest.h"
#include "nlohmann/json.hpp"
#include "siddiqsoft/RWLContainer.hpp"
TEST(examples, Example1)
{
try
{
siddiqsoft::RWLContainer<std::string, std::string> myContainer;
auto item = myContainer.add("foo", "bar");
ASSERT_TRUE(item);
EXPECT_EQ("bar", *item);
}
catch (...)
{
EXPECT_TRUE(false); // if we throw then the test fails.
}
}
Additional examples.
<small align="right">
© 2021 Siddiq Software LLC. All rights reserved.
</small>
Product | Versions Compatible and additional computed target framework versions. |
---|---|
native | native is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.