diff --git a/Test3/Test3.sln b/Test3/Test3.sln
new file mode 100644
index 0000000..05e8eca
--- /dev/null
+++ b/Test3/Test3.sln
@@ -0,0 +1,22 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test3", "Test3\Test3.csproj", "{343EA1D0-30F4-442D-9D43-A53DAF81EF29}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestQueue", "TestQueue\TestQueue.csproj", "{AB6B0736-EF18-424C-A5F7-B21772DE1D18}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {343EA1D0-30F4-442D-9D43-A53DAF81EF29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {343EA1D0-30F4-442D-9D43-A53DAF81EF29}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {343EA1D0-30F4-442D-9D43-A53DAF81EF29}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {343EA1D0-30F4-442D-9D43-A53DAF81EF29}.Release|Any CPU.Build.0 = Release|Any CPU
+ {AB6B0736-EF18-424C-A5F7-B21772DE1D18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {AB6B0736-EF18-424C-A5F7-B21772DE1D18}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {AB6B0736-EF18-424C-A5F7-B21772DE1D18}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {AB6B0736-EF18-424C-A5F7-B21772DE1D18}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+EndGlobal
diff --git a/Test3/Test3/.dockerignore b/Test3/Test3/.dockerignore
new file mode 100644
index 0000000..cd967fc
--- /dev/null
+++ b/Test3/Test3/.dockerignore
@@ -0,0 +1,25 @@
+**/.dockerignore
+**/.env
+**/.git
+**/.gitignore
+**/.project
+**/.settings
+**/.toolstarget
+**/.vs
+**/.vscode
+**/.idea
+**/*.*proj.user
+**/*.dbmdl
+**/*.jfm
+**/azds.yaml
+**/bin
+**/charts
+**/docker-compose*
+**/Dockerfile*
+**/node_modules
+**/npm-debug.log
+**/obj
+**/secrets.dev.yaml
+**/values.dev.yaml
+LICENSE
+README.md
\ No newline at end of file
diff --git a/Test3/Test3/Dockerfile b/Test3/Test3/Dockerfile
new file mode 100644
index 0000000..3af2f58
--- /dev/null
+++ b/Test3/Test3/Dockerfile
@@ -0,0 +1,18 @@
+FROM mcr.microsoft.com/dotnet/runtime:5.0 AS base
+WORKDIR /app
+
+FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
+WORKDIR /src
+COPY ["Test3/Test3.csproj", "Test3/"]
+RUN dotnet restore "Test3/Test3.csproj"
+COPY . .
+WORKDIR "/src/Test3"
+RUN dotnet build "Test3.csproj" -c Release -o /app/build
+
+FROM build AS publish
+RUN dotnet publish "Test3.csproj" -c Release -o /app/publish
+
+FROM base AS final
+WORKDIR /app
+COPY --from=publish /app/publish .
+ENTRYPOINT ["dotnet", "Test3.dll"]
diff --git a/Test3/Test3/Program.cs b/Test3/Test3/Program.cs
new file mode 100644
index 0000000..ff1d6f2
--- /dev/null
+++ b/Test3/Test3/Program.cs
@@ -0,0 +1,12 @@
+using System;
+
+namespace Test3
+{
+ class Program
+ {
+ static void Main(string[] args)
+ {
+ Console.WriteLine("Hello World!");
+ }
+ }
+}
\ No newline at end of file
diff --git a/Test3/Test3/QueuePriory.cs b/Test3/Test3/QueuePriory.cs
new file mode 100644
index 0000000..a576be5
--- /dev/null
+++ b/Test3/Test3/QueuePriory.cs
@@ -0,0 +1,88 @@
+using System;
+using System.Collections.Generic;
+using System.Threading;
+
+namespace Test3
+{
+ ///
+ /// потокобезопасная очередь с приоритетами
+ ///
+ public class QueuePriory
+ {
+ private List<(int value, int priority)> _queue;
+ private readonly Object _lockAdded = new();
+ private readonly Object _lockDelete = new();
+ private int _size = 0;
+ private bool flag = false;
+
+ public QueuePriory()
+ {
+ _queue = new List<(int, int)>();
+ }
+
+ ///
+ /// добавление в очередь
+ ///
+ public void Enqueue(int value, int priority)
+ {
+ var index = 1;
+ lock (_lockAdded)
+ {
+ if (_size == 0 && !flag)
+ {
+ _queue.Insert(0, (value, priority));
+ _size++;
+ //Monitor.PulseAll(_lockDelete);
+ return;
+ }
+
+ if (flag)
+ {
+ _queue.Insert(0, (value, priority));
+ _size++;
+ Monitor.PulseAll(_lockDelete);
+ return;
+ }
+ foreach (var t in _queue)
+ {
+ if (priority > t.priority)
+ {
+ _queue.Insert(index, (value, priority));
+ _size++;
+ return;
+ }
+
+ index++;
+ }
+ }
+ }
+
+ ///
+ /// удаление из очереди
+ ///
+ public int Dequeue()
+ {
+ var value = 0;
+ lock (_lockDelete)
+ {
+ while (_size == 0)
+ {
+ Volatile.Write(ref flag, true);
+ Monitor.Wait(_lockAdded);
+ }
+
+ value = _queue[1].value;
+ _queue.RemoveRange(1, 1);
+ Volatile.Write(ref flag, false);
+ _size--;
+ return value;
+ }
+ }
+
+ ///
+ /// возвращает размер
+ ///
+ public int Size()
+ => _size;
+ }
+}
diff --git a/Test3/Test3/Test3.csproj b/Test3/Test3/Test3.csproj
new file mode 100644
index 0000000..a184b89
--- /dev/null
+++ b/Test3/Test3/Test3.csproj
@@ -0,0 +1,9 @@
+
+
+
+ Exe
+ net5.0
+ Windows
+
+
+
diff --git a/Test3/TestQueue/TestQueue.csproj b/Test3/TestQueue/TestQueue.csproj
new file mode 100644
index 0000000..dcb38d8
--- /dev/null
+++ b/Test3/TestQueue/TestQueue.csproj
@@ -0,0 +1,21 @@
+
+
+
+ net5.0
+ enable
+
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Test3/TestQueue/UnitTest1.cs b/Test3/TestQueue/UnitTest1.cs
new file mode 100644
index 0000000..0548323
--- /dev/null
+++ b/Test3/TestQueue/UnitTest1.cs
@@ -0,0 +1,42 @@
+using System.Linq;
+using System.Threading;
+using System.Threading.Tasks;
+using NUnit.Framework;
+using Test3;
+
+namespace TestQueue
+{
+ public class Tests
+ {
+ [Test]
+ public void Test1()
+ {
+ var array = new (int, int)[50];
+ for (int i = 1; i < 51; ++i)
+ {
+ array[i - 1] = (51 - i, i);
+ }
+ var count = 0;
+ var queue = new QueuePriory();
+ var threads = new Thread[5];
+
+ for (int i = 0; i < threads.Length; ++i)
+ {
+ var localI = i;
+ Task.Run(() =>
+ {
+ for (int j = localI; j < 50; j += 5)
+ {
+ queue.Enqueue(array[j].Item1, array[j].Item2);
+ }
+ }
+ );
+ }
+
+ array = array.Reverse().ToArray();
+ Assert.AreEqual(50, queue.Size());
+ Assert.AreEqual(array[0].Item1, queue.Dequeue());
+ Assert.Pass();
+ }
+ }
+}
\ No newline at end of file