mirror of
https://github.com/google/nomulus
synced 2026-01-08 23:23:32 +00: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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user