(
activationKey: string,
activate: () => Promise<BackendGeneration>,
)
| 2852 | } |
| 2853 | |
| 2854 | private async shareBackendActivation( |
| 2855 | activationKey: string, |
| 2856 | activate: () => Promise<BackendGeneration>, |
| 2857 | ): Promise<BackendGeneration> { |
| 2858 | let activation = this.backendActivationBuilds.get(activationKey); |
| 2859 | if (!activation) { |
| 2860 | activation = activate(); |
| 2861 | this.backendActivationBuilds.set(activationKey, activation); |
| 2862 | } |
| 2863 | try { |
| 2864 | return await activation; |
| 2865 | } finally { |
| 2866 | if (this.backendActivationBuilds.get(activationKey) === activation) { |
| 2867 | this.backendActivationBuilds.delete(activationKey); |
| 2868 | } |
| 2869 | } |
| 2870 | } |
| 2871 | |
| 2872 | private resolveSubagentActivation( |
| 2873 | header: SessionHeader, |
no test coverage detected