Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Worker to include usage of ManagedBlocker #2

Merged
merged 6 commits into from
Jan 21, 2019
Merged

Updated Worker to include usage of ManagedBlocker #2

merged 6 commits into from
Jan 21, 2019

Conversation

lwj5
Copy link
Member

@lwj5 lwj5 commented Jan 18, 2019

Added invokeBlockingTask() in Worker to allow inline wrapping of I/O task in Handler. This allows ForkJoinPool to size-up thread count by 1, maintaining CPU parallelism.

worker.invokeBlockingTask(() -> {
  // Some I/O tasks
  try {
    Thread.sleep(10);
  } catch (InterruptedException e) {
    e.printStackTrace();
  }
});

@lwj5 lwj5 added the enhancement New feature or request label Jan 18, 2019
@lwj5 lwj5 self-assigned this Jan 18, 2019
@lwj5 lwj5 requested a review from sitfoxfly January 18, 2019 13:43
@coveralls
Copy link

coveralls commented Jan 18, 2019

Pull Request Test Coverage Report for Build 93

  • 39 of 48 (81.25%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+1.5%) to 74.952%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/main/java/ai/preferred/venom/ThreadedWorkerManager.java 26 30 86.67%
src/main/java/ai/preferred/venom/utils/InlineExecutorService.java 13 18 72.22%
Totals Coverage Status
Change from base Build 88: 1.5%
Covered Lines: 778
Relevant Lines: 1038

💛 - Coveralls

@lwj5 lwj5 merged commit a9654c1 into PreferredAI:master Jan 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants