mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Change metrics ThreadFactory to produce daemon threads
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=156106183
This commit is contained in:
parent
5ff56ac7a0
commit
e1f4df86bd
1 changed files with 5 additions and 1 deletions
|
@ -24,6 +24,7 @@ import com.google.appengine.api.ThreadManager;
|
|||
import com.google.appengine.api.modules.ModulesService;
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.util.concurrent.ThreadFactoryBuilder;
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
import google.registry.config.RegistryConfig.Config;
|
||||
|
@ -87,7 +88,10 @@ public final class StackdriverModule {
|
|||
@Provides
|
||||
@Named("metricsBackgroundThreadFactory")
|
||||
static ThreadFactory provideThreadFactory() {
|
||||
return ThreadManager.backgroundThreadFactory();
|
||||
return new ThreadFactoryBuilder()
|
||||
.setThreadFactory(ThreadManager.backgroundThreadFactory())
|
||||
.setDaemon(true)
|
||||
.build();
|
||||
}
|
||||
|
||||
@Provides
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue