fix SchedulerService isolate-spawn race (T-106)
_startTicker fired Isolate.spawn(...).then((iso) => _isolate = iso) and returned. If _stopTicker landed before the spawn future resolved, _isolate was still null at kill time and the just-spawned isolate (with its Timer.periodic) leaked forever. Track the spawn as _isolateReady and have _stopTicker await it before killing. Same shape as the NativePty fix from T-96. dispose() is now async; the single caller in facade.dart already sat inside an async dispose chain and just needed the await. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -238,7 +238,7 @@ class KernelServices {
|
||||
focus.dispose();
|
||||
project.dispose();
|
||||
extensions.dispose();
|
||||
scheduler.dispose();
|
||||
await scheduler.dispose();
|
||||
await log.dispose();
|
||||
messages.dispose();
|
||||
await events.dispose();
|
||||
|
||||
Reference in New Issue
Block a user