()
| 352 | } |
| 353 | |
| 354 | private async ensureStarted(): Promise<void> { |
| 355 | if (this.child && this.child.exitCode === null && !this.child.killed) { |
| 356 | return |
| 357 | } |
| 358 | if (this.startupPromise) { |
| 359 | await this.startupPromise |
| 360 | return |
| 361 | } |
| 362 | this.startupPromise = this.start() |
| 363 | try { |
| 364 | await this.startupPromise |
| 365 | } finally { |
| 366 | this.startupPromise = null |
| 367 | } |
| 368 | } |
| 369 | |
| 370 | private async start(): Promise<void> { |
| 371 | const rustHostPath = await resolvePythonReplHostExecutable() |