Skip to content

Commit

Permalink
Don't dispose Tasks (unless its waithandle is used) (#6708)
Browse files Browse the repository at this point in the history
  • Loading branch information
benaadams authored Feb 12, 2024
1 parent ee6e145 commit 2a4edee
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

namespace Nethermind.Consensus.Processing;

public class BlockchainProcessor : IBlockchainProcessor, IBlockProcessingQueue
public sealed class BlockchainProcessor : IBlockchainProcessor, IBlockProcessingQueue
{
public int SoftMaxRecoveryQueueSizeInTx = 10000; // adjust based on tx or gas
public const int MaxProcessingQueueSize = 2000; // adjust based on tx or gas
Expand Down Expand Up @@ -749,8 +749,6 @@ public void Dispose()
_recoveryQueue.Dispose();
_blockQueue.Dispose();
_loopCancellationSource?.Dispose();
_recoveryTask?.Dispose();
_processorTask?.Dispose();
_blockTree.NewBestSuggestedBlock -= OnNewBestBlock;
_blockTree.NewHeadBlock -= OnNewHeadBlock;
}
Expand Down

0 comments on commit 2a4edee

Please sign in to comment.