Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Cleanup Ibft executors #951

Merged
merged 5 commits into from
Feb 25, 2019
Merged

Cleanup Ibft executors #951

merged 5 commits into from
Feb 25, 2019

Conversation

rain-on
Copy link
Contributor

@rain-on rain-on commented Feb 24, 2019

Explicitly clean up executors used for IBFT timers.

@@ -214,21 +215,20 @@

final IbftGossip gossiper = new IbftGossip(uniqueMessageMulticaster);

final ScheduledExecutorService timerExecutor = Executors.newSingleThreadScheduledExecutor();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be good idea to use the MonitoredExecutors.newFixedThreadPool so we can give our thread pool a name and get some free metrics as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

try {
timerExecutor.awaitTermination(5, TimeUnit.SECONDS);
} catch (final InterruptedException e) {
LOG.error("Failed to shutdown timerexecutor");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: thinking this should be "Failed to shutdown timer executor"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

@rain-on rain-on merged commit a712bc6 into PegaSysEng:master Feb 25, 2019
@rain-on rain-on deleted the executors branch February 25, 2019 22:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants