adjusted project structure
This commit is contained in:
1 parent
aa7310d495
commit
904b32f986
18 files changed
+79
-212
No files matched your search
@@ -0,0 +1,28 @@
|
||||
namespace HandyControl.Collections
|
||||
{
|
||||
public class SynchronizedPool<T> : SimplePool<T>
|
||||
{
|
||||
private readonly object _lockObj = new();
|
||||
|
||||
public SynchronizedPool(int maxPoolSize) : base(maxPoolSize)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override T Acquire()
|
||||
{
|
||||
lock (_lockObj)
|
||||
{
|
||||
return base.Acquire();
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Release(T element)
|
||||
{
|
||||
lock (_lockObj)
|
||||
{
|
||||
return base.Release(element);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user