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

EthScheduler additions #767

Merged
merged 5 commits into from
Feb 5, 2019
Merged

EthScheduler additions #767

merged 5 commits into from
Feb 5, 2019

Conversation

shemnon
Copy link
Contributor

@shemnon shemnon commented Feb 5, 2019

PR description

Add the services thread pool and a computation thread pool to the
EthScheduler.

  • Services are long running, sequential, and infrequently start tasks
    such as Full Sync and Fast Sync.
  • Computations are short and high CPU intensity tasks such as ECDSA
    signature extractions and POW validation. The intent is that each
    runnable represents one such extraction and the extractions from a
    block are saturated across available processing power. These
    computations should have zero dependencies outside their object and
    thread.

Add the services thread pool and a computation thread pool to the
EthScheduler.

* Services are long running, sequential, and infrequently start tasks
  such as Full Sync and Fast Sync.
* Computations are short and high CPU intensity tasks such as ECDSA
  signature extractions and POW validation.  The intent is that each
  runnable represents one such extraction and the extractions from a
  block are saturated across available processing power.  These
  computations should have zero dependencies outside their object and
  thread.
Copy link
Contributor

@ajsutton ajsutton left a comment

Choose a reason for hiding this comment

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

LGTM. Avoiding the sequence of waits on shutdown would be nice but may be something to log as a ticket for future follow up.

"{} computation executor did not shutdown cleanly.", this.getClass().getSimpleName());
computationExecutor.shutdownNow();
computationExecutor.awaitTermination(2L, TimeUnit.MINUTES);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This is starting to add up to a lot of waiting. Maybe we should set it up so that we call shutdown on all of them, wait then shutdownNow on any not shutdown, then wait and log any that still failed to shutdown?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sounds like a good first issue - https://github.com/PegaSysEng/pantheon/issues/768

@shemnon shemnon merged commit cd07193 into PegaSysEng:master Feb 5, 2019
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.

2 participants