Skip to content

Commit 75c0801

Browse files
committed
Add appendix on async method option
1 parent 9de462f commit 75c0801

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

specs/BrowserProcessExited.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,3 +184,17 @@ namespace Microsoft.Web.WebView2.Core
184184
}
185185
}
186186
```
187+
188+
# Appendix
189+
We expect that for the two scenarios this API is designed for, namely cleanup of
190+
the user data folder and upgrading the `WebView2 Runtime`, an app adding a
191+
handler for `BrowserProcessExited` will only be interested in the next single
192+
time the browser process exits (even if there could be more browser processes
193+
being created and exiting throughout the lifetime of a
194+
`CoreWebView2Environment`). For this reason, we also consider making this event
195+
an async method instead (e.g., `RegisterWaitForBrowserProcessExit`).
196+
197+
While there would be no operation started on calling the async method, a handler
198+
would be a added to be run (only) the next time the browser process associated
199+
to the `CoreWebView2Environment` exits, which in turn would make API usage
200+
easier for the two expected scenarios.

0 commit comments

Comments
 (0)