aboutsummaryrefslogtreecommitdiff
path: root/Utils/src/Async/IAsyncExclusiveResource.cs
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2023-01-08 14:44:01 -0500
committerLibravatar vnugent <public@vaughnnugent.com>2023-01-08 14:44:01 -0500
commitbe6dc557a3b819248b014992eb96c1cb21f8112b (patch)
tree5361530552856ba8154bfcfbfac8377549117c9e /Utils/src/Async/IAsyncExclusiveResource.cs
parent072a1294646542a73007784d08a35ffcad557b1b (diff)
Initial commit
Diffstat (limited to 'Utils/src/Async/IAsyncExclusiveResource.cs')
-rw-r--r--Utils/src/Async/IAsyncExclusiveResource.cs40
1 files changed, 40 insertions, 0 deletions
diff --git a/Utils/src/Async/IAsyncExclusiveResource.cs b/Utils/src/Async/IAsyncExclusiveResource.cs
new file mode 100644
index 0000000..93157ce
--- /dev/null
+++ b/Utils/src/Async/IAsyncExclusiveResource.cs
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2022 Vaughn Nugent
+*
+* Library: VNLib
+* Package: VNLib.Utils
+* File: IAsyncExclusiveResource.cs
+*
+* IAsyncExclusiveResource.cs is part of VNLib.Utils which is part of the larger
+* VNLib collection of libraries and utilities.
+*
+* VNLib.Utils is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published
+* by the Free Software Foundation, either version 2 of the License,
+* or (at your option) any later version.
+*
+* VNLib.Utils is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with VNLib.Utils. If not, see http://www.gnu.org/licenses/.
+*/
+
+using System.Threading.Tasks;
+using VNLib.Utils.Resources;
+
+namespace VNLib.Utils.Async
+{
+ /// <summary>
+ /// <inheritdoc/>
+ /// </summary>
+ public interface IAsyncExclusiveResource : IResource
+ {
+ /// <summary>
+ /// Releases the resource from use. Called when a <see cref="ExclusiveResourceHandle{T}"/> is disposed
+ /// </summary>
+ ValueTask ReleaseAsync();
+ }
+} \ No newline at end of file