sparse-intern-71089
06/09/2023, 5:59 PMmicroscopic-pilot-97530
full-dress-10026
06/09/2023, 7:15 PMmicroscopic-pilot-97530
microscopic-pilot-97530
microscopic-pilot-97530
quaint-spring-93350
06/12/2023, 7:32 AMquaint-spring-93350
06/12/2023, 7:35 AMmicroscopic-pilot-97530
AsyncLocal<T>
for the Deployment
instance: https://github.com/pulumi/pulumi-dotnet/blob/12adc4120be1c06d3b4510c60667e1984ecbdf5a/sdk/Pulumi/Deployment/Deployment.cs#L44
Does Java have something equivalent to .NET’s AsyncLocal<T>
that could be used to store the Deployment
instance? https://learn.microsoft.com/en-us/dotnet/api/system.threading.asynclocal-1?view=net-7.0quaint-spring-93350
06/12/2023, 10:04 AMquaint-spring-93350
06/12/2023, 10:07 AMquaint-spring-93350
06/12/2023, 10:08 AMmicroscopic-pilot-97530
Deployment
instance as an arg to the callback. Then rather than accessing the singleton, the program would use the passed-in instance. (I’m not sure if that’s even possible if there are things within the SDK that will be trying to use the singleton).quaint-spring-93350
06/12/2023, 10:13 AMquaint-spring-93350
06/12/2023, 10:16 AMquaint-spring-93350
06/12/2023, 10:17 AMDeployment.getInstance().readOrRegisterResource(...)
quaint-spring-93350
06/12/2023, 10:19 AMquaint-spring-93350
06/12/2023, 10:35 AMbrave-dawn-64711
06/23/2023, 7:25 AMbrave-dawn-64711
06/23/2023, 7:27 AM