Fix threads leak when PostTask is executed

Issue:
When PostTask is created it receives executor that is created by
ExecutorProvider. Provider is not scoped therefore new instance is
created each time when new PostTask is created. As a result executors
are being constantly created and never re-used.

Solution:
Bind ExecutorProvider to SINGLETON scope so that it keeps returning the
same executor that is effectively re-used by PostTask instances.

Note: to increase throughput default threadPoolSize was increased to 2.

Change-Id: I6ae0a2cf9f17df529a209735eca30593891194c3
Signed-off-by: Jacek Centkowski <jcentkowski@collab.net>
3 files changed
tree: 08908fe18362c8e296db4e58e13aae08f82f3799
  1. src/
  2. tools/
  3. .gitignore
  4. bazlets.bzl
  5. BUILD
  6. external_plugin_deps.bzl
  7. WORKSPACE