From ed0677e4e4665472b370dec7fc51438db7cecbe2 Mon Sep 17 00:00:00 2001 From: amaitland Date: Fri, 14 Oct 2016 14:47:14 +1000 Subject: [PATCH] Improve xml doc around Cef.Shutdown and Cef.Initialize --- CefSharp.Core/Cef.h | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/CefSharp.Core/Cef.h b/CefSharp.Core/Cef.h index 2efd6751f..621167705 100644 --- a/CefSharp.Core/Cef.h +++ b/CefSharp.Core/Cef.h @@ -125,8 +125,11 @@ namespace CefSharp } /// - /// Initializes CefSharp with the default settings. - /// This function should be called on the main application thread to initialize the CEF browser process. + /// Initializes CefSharp with the default settings. + /// This function can only be called once, subsiquent calls will result in an Exception. + /// It's important to note that Initialize and Shutdown MUST be called on your main + /// applicaiton thread (Typically the UI thead). If you call them on different + /// threads, your application will hang. See the documentation for Cef.Shutdown() for more details. /// /// true if successful; otherwise, false. static bool Initialize() @@ -137,7 +140,9 @@ namespace CefSharp /// /// Initializes CefSharp with user-provided settings. - /// This function should be called on the main application thread to initialize the CEF browser process. + /// It's important to note that Initialize and Shutdown MUST be called on your main + /// applicaiton thread (Typically the UI thead). If you call them on different + /// threads, your application will hang. See the documentation for Cef.Shutdown() for more details. /// /// CefSharp configuration settings. /// true if successful; otherwise, false. @@ -148,7 +153,9 @@ namespace CefSharp /// /// Initializes CefSharp with user-provided settings. - /// This function should be called on the main application thread to initialize the CEF browser process. + /// It's important to note that Initialize/Shutdown MUST be called on your main + /// applicaiton thread (Typically the UI thead). If you call them on different + /// threads, your application will hang. See the documentation for Cef.Shutdown() for more details. /// /// CefSharp configuration settings. /// Check that all relevant dependencies avaliable, throws exception if any are missing @@ -360,7 +367,10 @@ namespace CefSharp /// /// Shuts down CefSharp and the underlying CEF infrastructure. This method is safe to call multiple times; it will only /// shut down CEF on the first call (all subsequent calls will be ignored). - /// This function should be called on the main application thread to shut down the CEF browser process before the application exits. + /// This method should be called on the main application thread to shut down the CEF browser process before the application exits. + /// If you are Using CefSharp.OffScreen then you must call this explicitly before your application exits or it will hang. + /// This method must be called on the same thread as Initialize. If you don't call Shutdown explicitly then CefSharp.Wpf and CefSharp.WinForms + /// versions will do their best to call Shutdown for you, if your application is having trouble closing then call thus explicitly. /// static void Shutdown() {