MCPcopy Create free account
hub / github.com/apache/maka / shareBackendActivation

Method shareBackendActivation

packages/runtime/src/runtime-kernel.ts:2854–2870  ·  view source on GitHub ↗
(
    activationKey: string,
    activate: () => Promise<BackendGeneration>,
  )

Source from the content-addressed store, hash-verified

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,

Callers 2

ensureActiveMethod · 0.95
ensureChildActiveMethod · 0.95

Calls 4

getMethod · 0.65
setMethod · 0.65
deleteMethod · 0.65
activateFunction · 0.50

Tested by

no test coverage detected