Closed kubukoz closed 6 years ago
Did you want this on the master branch and not 0.1.x as you mentioned in gitter?
I was thinking we'd go to master first and then I'd follow up with a backport to 0.1.x
On Mon, Aug 20, 2018, 09:31 Christopher Davenport notifications@github.com wrote:
Did you want this on the master branch and not 0.1.x as you mentioned in gitter?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ChristopherDavenport/linebacker/pull/29#issuecomment-414317292, or mute the thread https://github.com/notifications/unsubscribe-auth/AA2npMk4YQQ0D8CBiic8NGNu-z2ixXDDks5uSrosgaJpZM4WDSSH .
(unless we could merge 0.1.x to master after merging something like this to 0.1.x)
On Mon, Aug 20, 2018, 09:32 Jakub Kozłowski kubukoz@gmail.com wrote:
I was thinking we'd go to master first and then I'd follow up with a backport to 0.1.x
On Mon, Aug 20, 2018, 09:31 Christopher Davenport < notifications@github.com> wrote:
Did you want this on the master branch and not 0.1.x as you mentioned in gitter?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ChristopherDavenport/linebacker/pull/29#issuecomment-414317292, or mute the thread https://github.com/notifications/unsubscribe-auth/AA2npMk4YQQ0D8CBiic8NGNu-z2ixXDDks5uSrosgaJpZM4WDSSH .
This is a better approach to that end, 0.1.x can no longer easily merge forward.
Updated the PR with the lambdas removed - the "overloads" are still there, but only to overcome the limitation of default parameters (the Sync instance isn't visible there).
Updated, sorry for the delay.
This PR adds "overloads" (not really, they have different names) allowing modifications of the default
ThreadFactory
(or supplying a completely different one) for all the exposed methods for creating executors.While I don't feel like this will be super useful to a lot of people (I guess everyone who needs that much control over the executor can just implement it themselves, without using
Executors
at all), it might be something that we want to have in linebacker.Note that:
configureThreadFactory
has typeF[ThreadFactory] => F[ThreadFactory]
(or more specific, likeF[ForkJoinWorkerThreadFactory] => F[ForkJoinWorkerThreadFactory]
in case of fork-join pools) so that the default configuration can be ignored without being constructedconfigureThreadFactory
a default argument withidentity
orx => x
as the default requires adding type annotations = boilerplate. Because of that, I decided to add new methods for now.