File tree 1 file changed +6
-4
lines changed
temporal-sdk/src/main/java/io/temporal/internal/client/external
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 4
4
import static io .temporal .serviceclient .MetricsTag .METRICS_TAGS_CALL_OPTIONS_KEY ;
5
5
6
6
import com .google .common .util .concurrent .ListenableFuture ;
7
+ import com .google .common .util .concurrent .ThreadFactoryBuilder ;
7
8
import com .uber .m3 .tally .Scope ;
8
9
import com .uber .m3 .util .ImmutableMap ;
9
10
import io .grpc .Deadline ;
18
19
import javax .annotation .Nonnull ;
19
20
20
21
public final class GenericWorkflowClientImpl implements GenericWorkflowClient {
21
-
22
- // TODO we need to shutdown this executor
23
22
private static final ScheduledExecutorService asyncThrottlerExecutor =
24
- new ScheduledThreadPoolExecutor (1 , r -> new Thread (r , "generic-wf-client-async-throttler" ));
25
-
23
+ Executors .newSingleThreadScheduledExecutor (
24
+ new ThreadFactoryBuilder ()
25
+ .setDaemon (true )
26
+ .setNameFormat ("generic-wf-client-async-throttler-%d" )
27
+ .build ());
26
28
private final WorkflowServiceStubs service ;
27
29
private final Scope metricsScope ;
28
30
private final GrpcRetryer grpcRetryer ;
You can’t perform that action at this time.
0 commit comments