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: 96173a94e8154c0cb08ffc4f4900e3db12f76726
  1. lib/
  2. src/
  3. .buckconfig
  4. .gitignore
  5. BUCK