-
Notifications
You must be signed in to change notification settings - Fork 163
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
AsyncFunc: executor service as a field #330
Conversation
Codecov Report
@@ Coverage Diff @@
## master #330 +/- ##
============================================
+ Coverage 74.22% 74.41% +0.18%
- Complexity 424 431 +7
============================================
Files 131 132 +1
Lines 1424 1450 +26
Branches 68 69 +1
============================================
+ Hits 1057 1079 +22
- Misses 347 351 +4
Partials 20 20
Continue to review full report at Codecov.
|
@@ -91,12 +92,12 @@ public AsyncFunc(final Proc<X> proc, final ThreadFactory fct) { | |||
*/ | |||
public AsyncFunc(final Func<X, Y> fnc, final ThreadFactory fct) { | |||
this.func = fnc; | |||
this.factory = fct; | |||
this.executor = Executors.newSingleThreadExecutor(fct); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@caarlos0 I believe that this ctor must become a secondary one. We should introduce a primary one, which will accept Func
and ExecutorService
.
@caarlos0 thanks, see my comment above |
@yegor256 pushed |
this also close #324 |
@rultor merge |
@yegor256 can you deploy it please? |
@caarlos0 see 0.11.7 |
may avoid the premature termination of the executor service...