Skip to content

Commit

Permalink
Core - Update CefThreadIds enum
Browse files Browse the repository at this point in the history
This is a breaking change

Resolves #3597
  • Loading branch information
amaitland committed Jun 4, 2021
1 parent 9943333 commit e1ac768
Showing 1 changed file with 31 additions and 15 deletions.
46 changes: 31 additions & 15 deletions CefSharp/Enums/CefThreadIds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,40 @@ public enum CefThreadIds
// BROWSER PROCESS THREADS -- Only available in the browser process.

/// <summary>
/// The CEF UI thread in the browser. In CefSharp this is ALWAYS
/// separate from the application's main thread (and thus the main
/// WinForm UI thread).
/// The CEF UI thread in the browser. In CefSharp this is by default
/// different from your main applications UI Thread
/// (e.g. WPF/WinForms UI Threads). Only when MultiThreadedMessageLoop
/// is false will this be the same as your app UI Thread.
/// </summary>
TID_UI,

/// <summary>
/// Used to interact with the database.
/// Used for blocking tasks (e.g. file system access) where the user won't
/// notice if the task takes an arbitrarily long time to complete. All tasks
/// posted after <see cref="IBrowserProcessHandler.OnContextInitialized"/>
/// and before Cef.Shutdown() are guaranteed to run.
/// </summary>
TID_DB,
TID_FILE_BACKGROUND,

/// <summary>
/// Used to interact with the file system.
/// Used for blocking tasks (e.g. file system access) that affect UI or
/// responsiveness of future user interactions. Do not use if an immediate
/// response to a user interaction is expected. All tasks posted after
/// <see cref="IBrowserProcessHandler.OnContextInitialized"/> and before Cef.Shutdown()
/// are guaranteed to run.
/// Examples:
/// - Updating the UI to reflect progress on a long task.
/// - Loading data that might be shown in the UI after a future user
/// interaction.
/// </summary>
TID_FILE,
TID_FILE_USER_VISIBLE,

/// <summary>
/// Used for file system operations that block user interactions.
/// Responsiveness of this thread affects users.
/// Used for blocking tasks (e.g. file system access) that affect UI
/// immediately after a user interaction. All tasks posted after
/// <see cref="IBrowserProcessHandler.OnContextInitialized"/> and before Cef.Shutdown()
/// are guaranteed to run.
/// Example: Generating data shown in the UI immediately after a click.
/// </summary>
TID_FILE_USER_BLOCKING,

Expand All @@ -40,19 +55,20 @@ public enum CefThreadIds
TID_PROCESS_LAUNCHER,

/// <summary>
/// Used to handle slow HTTP cache operations.
/// </summary>
TID_CACHE,

/// <summary>
/// Used to process IPC and network messages.
/// Used to process IPC and network messages. Do not perform blocking tasks on
/// this thread. All tasks posted after <see cref="IBrowserProcessHandler.OnContextInitialized"/>
/// and before Cef.Shutdown() are guaranteed to run.
/// </summary>
TID_IO,

// RENDER PROCESS THREADS -- Only available in the render process.

/// <summary>
/// The main thread in the renderer. Used for all WebKit and V8 interaction.
/// Tasks may be posted to this thread after
/// CefRenderProcessHandler::OnWebKitInitialized but are not guaranteed to
/// run before sub-process termination (sub-processes may be killed at any time
/// without warning).
/// </summary>
TID_RENDERER,
}
Expand Down

0 comments on commit e1ac768

Please sign in to comment.