Skip to content

Commit 3382224

Browse files
committed
Add explicit note for waits with shared UDF
1 parent 7b1afb8 commit 3382224

1 file changed

Lines changed: 30 additions & 21 deletions

File tree

specs/BrowserProcessExited.md

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,17 @@ different scenarios. It is up to the app to coordinate the handlers so they do
3232
not try to perform reliability recovery while also trying to move to a new
3333
WebView2 Runtime version or remove the user data folder.
3434

35-
Multiple app processes can share a browser process by creating their
36-
`CoreWebView2Environment` with the same user data folder. When the entire
37-
collection of WebView2Runtime processes sharing the browser process exit, all
38-
associated `CoreWebview2Environment` objects receive the `BrowserProcessExited`
35+
Multiple app processes can share a browser process by creating their webviews
36+
from a `CoreWebView2Environment` with the same user data folder. When the entire
37+
collection of WebView2Runtime processes for the browser process exit, all
38+
associated `CoreWebView2Environment` objects receive the `BrowserProcessExited`
3939
event. Multiple processes sharing the same browser process need to coordinate
40-
their use of the shared user data folder to avoid race conditions. For example,
41-
one process should not clear the user data folder at the same time that another
42-
process recovers from a crash by recreating its WebView controls.
40+
their use of the shared user data folder to avoid race conditions and
41+
unnecessary waits. For example, one process should not clear the user data
42+
folder at the same time that another process recovers from a crash by recreating
43+
its WebView controls; one process should not block waiting for the event if
44+
other app processes are using the same browser process (the browser process will
45+
not exit until those other processes have closed their webviews too).
4346

4447

4548
# Examples
@@ -314,14 +317,17 @@ interface ICoreWebView2Environment3 : ICoreWebView2Environment2
314317
/// `remove_BrowserProcessExited`, even if a new browser process is bound to
315318
/// this environment after earlier `BrowserProcessExited` events are raised.
316319
///
317-
/// Multiple app processes can share a browser process by creating their
318-
/// `ICoreWebView2Environment` with the same user data folder. When the entire
319-
/// collection of WebView2Runtime processes sharing the browser process exit, all
320-
/// associated `ICoreWebview2Environment` objects receive the `BrowserProcessExited`
320+
/// Multiple app processes can share a browser process by creating their webviews
321+
/// from a `ICoreWebView2Environment` with the same user data folder. When the entire
322+
/// collection of WebView2Runtime processes for the browser process exit, all
323+
/// associated `ICoreWebView2Environment` objects receive the `BrowserProcessExited`
321324
/// event. Multiple processes sharing the same browser process need to coordinate
322-
/// their use of the shared user data folder to avoid race conditions. For example,
323-
/// one process should not clear the user data folder at the same time that another
324-
/// process recovers from a crash by recreating its WebView controls.
325+
/// their use of the shared user data folder to avoid race conditions and
326+
/// unnecessary waits. For example, one process should not clear the user data
327+
/// folder at the same time that another process recovers from a crash by recreating
328+
/// its WebView controls; one process should not block waiting for the event if
329+
/// other app processes are using the same browser process (the browser process will
330+
/// not exit until those other processes have closed their webviews too).
325331
///
326332
/// Note this is an event from the `ICoreWebView2Environment3` interface, not
327333
/// the `ICoreWebView2` one. The difference between `BrowserProcessExited` and
@@ -396,14 +402,17 @@ namespace Microsoft.Web.WebView2.Core
396402
/// WebViews are closed), after all resources (including the user data folder)
397403
/// have been released.
398404
///
399-
/// Multiple app processes can share a browser process by creating their
400-
/// `CoreWebView2Environment` with the same user data folder. When the entire
401-
/// collection of WebView2Runtime processes sharing the browser process exit, all
402-
/// associated `CoreWebview2Environment` objects receive the `BrowserProcessExited`
405+
/// Multiple app processes can share a browser process by creating their webviews
406+
/// from a `CoreWebView2Environment` with the same user data folder. When the entire
407+
/// collection of WebView2Runtime processes for the browser process exit, all
408+
/// associated `CoreWebView2Environment` objects receive the `BrowserProcessExited`
403409
/// event. Multiple processes sharing the same browser process need to coordinate
404-
/// their use of the shared user data folder to avoid race conditions. For example,
405-
/// one process should not clear the user data folder at the same time that another
406-
/// process recovers from a crash by recreating its WebView controls.
410+
/// their use of the shared user data folder to avoid race conditions and
411+
/// unnecessary waits. For example, one process should not clear the user data
412+
/// folder at the same time that another process recovers from a crash by recreating
413+
/// its WebView controls; one process should not block waiting for the event if
414+
/// other app processes are using the same browser process (the browser process will
415+
/// not exit until those other processes have closed their webviews too).
407416
///
408417
/// Note this is an event from `CoreWebView2Environment`, not `CoreWebView2`. The
409418
/// difference between `BrowserProcessExited` and `CoreWebView2`'s

0 commit comments

Comments
 (0)