@@ -12,25 +12,40 @@ public enum CefThreadIds
12
12
// BROWSER PROCESS THREADS -- Only available in the browser process.
13
13
14
14
/// <summary>
15
- /// The CEF UI thread in the browser. In CefSharp this is ALWAYS
16
- /// separate from the application's main thread (and thus the main
17
- /// WinForm UI thread).
15
+ /// The CEF UI thread in the browser. In CefSharp this is by default
16
+ /// different from your main applications UI Thread
17
+ /// (e.g. WPF/WinForms UI Threads). Only when MultiThreadedMessageLoop
18
+ /// is false will this be the same as your app UI Thread.
18
19
/// </summary>
19
20
TID_UI ,
20
21
21
22
/// <summary>
22
- /// Used to interact with the database.
23
+ /// Used for blocking tasks (e.g. file system access) where the user won't
24
+ /// notice if the task takes an arbitrarily long time to complete. All tasks
25
+ /// posted after <see cref="IBrowserProcessHandler.OnContextInitialized"/>
26
+ /// and before Cef.Shutdown() are guaranteed to run.
23
27
/// </summary>
24
- TID_DB ,
28
+ TID_FILE_BACKGROUND ,
25
29
26
30
/// <summary>
27
- /// Used to interact with the file system.
31
+ /// Used for blocking tasks (e.g. file system access) that affect UI or
32
+ /// responsiveness of future user interactions. Do not use if an immediate
33
+ /// response to a user interaction is expected. All tasks posted after
34
+ /// <see cref="IBrowserProcessHandler.OnContextInitialized"/> and before Cef.Shutdown()
35
+ /// are guaranteed to run.
36
+ /// Examples:
37
+ /// - Updating the UI to reflect progress on a long task.
38
+ /// - Loading data that might be shown in the UI after a future user
39
+ /// interaction.
28
40
/// </summary>
29
- TID_FILE ,
41
+ TID_FILE_USER_VISIBLE ,
30
42
31
43
/// <summary>
32
- /// Used for file system operations that block user interactions.
33
- /// Responsiveness of this thread affects users.
44
+ /// Used for blocking tasks (e.g. file system access) that affect UI
45
+ /// immediately after a user interaction. All tasks posted after
46
+ /// <see cref="IBrowserProcessHandler.OnContextInitialized"/> and before Cef.Shutdown()
47
+ /// are guaranteed to run.
48
+ /// Example: Generating data shown in the UI immediately after a click.
34
49
/// </summary>
35
50
TID_FILE_USER_BLOCKING ,
36
51
@@ -40,19 +55,20 @@ public enum CefThreadIds
40
55
TID_PROCESS_LAUNCHER ,
41
56
42
57
/// <summary>
43
- /// Used to handle slow HTTP cache operations.
44
- /// </summary>
45
- TID_CACHE ,
46
-
47
- /// <summary>
48
- /// Used to process IPC and network messages.
58
+ /// Used to process IPC and network messages. Do not perform blocking tasks on
59
+ /// this thread. All tasks posted after <see cref="IBrowserProcessHandler.OnContextInitialized"/>
60
+ /// and before Cef.Shutdown() are guaranteed to run.
49
61
/// </summary>
50
62
TID_IO ,
51
63
52
64
// RENDER PROCESS THREADS -- Only available in the render process.
53
65
54
66
/// <summary>
55
67
/// The main thread in the renderer. Used for all WebKit and V8 interaction.
68
+ /// Tasks may be posted to this thread after
69
+ /// CefRenderProcessHandler::OnWebKitInitialized but are not guaranteed to
70
+ /// run before sub-process termination (sub-processes may be killed at any time
71
+ /// without warning).
56
72
/// </summary>
57
73
TID_RENDERER ,
58
74
}
0 commit comments