Commit cd29d0c
committed
fix(core): prevent race condition in dispose method
Updates the `dispose` method in `AppDependencies` to await the completion of the `_initCompleter` before proceeding with resource cleanup.
This change prevents a race condition where `dispose()` could be called while `_initializeDependencies()` is still executing, which would lead to unpredictable errors from tearing down resources that are actively being initialized. The `dispose` method now safely waits for initialization to finish, whether it succeeded or failed, ensuring a clean and predictable shutdown sequence.1 parent aa55e93 commit cd29d0c
1 file changed
+12
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
309 | 321 | | |
310 | 322 | | |
311 | 323 | | |
| |||
0 commit comments