Skip to content

Commit 68ce56c

Browse files
committed
fix: fixed merge issues.
1 parent 20b38c8 commit 68ce56c

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

HandyIpc/Core/AsyncPool.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33

44
namespace HandyIpc.Core
55
{
6-
internal sealed class AsyncPool<T> : PoolBase<T> where T : IDisposable
6+
public sealed class AsyncPool<T> : PoolBase<T> where T : IDisposable
77
{
88
private readonly Func<Task<T>> _factory;
99
private readonly Func<T, Task<bool>> _checkValue;
1010

11-
public AsyncPool(Func<Task<T>> factory, Func<T, Task<bool>>? checkValue = null)
11+
public AsyncPool(Func<Task<T>> factory, Func<T, Task<bool>> checkValue)
1212
{
1313
_factory = factory;
1414
_checkValue = checkValue;

HandyIpc/Core/Pool.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
namespace HandyIpc.Core
44
{
5-
internal sealed class Pool<T> : PoolBase<T> where T : IDisposable
5+
public sealed class Pool<T> : PoolBase<T> where T : IDisposable
66
{
77
private readonly Func<T> _factory;
88
private readonly Func<T, bool> _checkValue;
99

10-
public Pool(Func<T> factory, Func<T, bool>? checkValue = null)
10+
public Pool(Func<T> factory, Func<T, bool> checkValue)
1111
{
1212
_factory = factory;
1313
_checkValue = checkValue;

HandyIpc/Core/PoolBase.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
namespace HandyIpc.Core
55
{
6-
public abstract class PoolBase<TValue> : IDisposable where TValue : IDisposable
6+
public abstract class PoolBase<T> : IDisposable where T : IDisposable
77
{
8-
protected readonly ConcurrentBag<TValue> Cache = new();
8+
protected readonly ConcurrentBag<T> Cache = new();
99

1010
private bool _isDisposed;
1111

@@ -23,7 +23,7 @@ protected virtual void Dispose(bool disposing)
2323

2424
if (disposing)
2525
{
26-
while (Cache.TryTake(out TValue item))
26+
while (Cache.TryTake(out T item))
2727
{
2828
item.Dispose();
2929
}

HandyIpc/Core/RentedValue.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
namespace HandyIpc.Core
44
{
5-
public readonly struct RentedValue<TValue> : IDisposable
5+
public readonly struct RentedValue<T> : IDisposable
66
{
7-
private readonly Action<TValue> _dispose;
7+
private readonly Action<T> _dispose;
88

9-
public TValue Value { get; }
9+
public T Value { get; }
1010

11-
public RentedValue(TValue value, Action<TValue> dispose)
11+
public RentedValue(T value, Action<T> dispose)
1212
{
1313
_dispose = dispose;
1414
Value = value;

0 commit comments

Comments
 (0)