(backendName: string)
| 233 | } |
| 234 | |
| 235 | findBackend(backendName: string): KernelBackend { |
| 236 | if (!(backendName in this.registry)) { |
| 237 | // If the backend hasn't been initialized but we have a registry entry for |
| 238 | // it, initialize it and return it. |
| 239 | if (backendName in this.registryFactory) { |
| 240 | const {asyncInit} = this.initializeBackend(backendName); |
| 241 | if (asyncInit) { |
| 242 | // Backend is not ready yet. |
| 243 | return null; |
| 244 | } |
| 245 | } else { |
| 246 | return null; |
| 247 | } |
| 248 | } |
| 249 | return this.registry[backendName]; |
| 250 | } |
| 251 | |
| 252 | findBackendFactory(backendName: string): |
| 253 | () => KernelBackend | Promise<KernelBackend> { |
no test coverage detected