CEF有几种线程,比如TID_UI、比如TID_RENDER,每种都有特定的含义,具体类别定义在cef_types.h中,摘录如下:
typedef enum {
// BROWSER PROCESS THREADS -- Only available in the browser process.
///
// The main thread in the browser. This will be the same as the main
// application thread if CefInitialize() is called with a
// CefSettings.multi_threaded_message_loop value of false.
///
TID_UI,
///
// Used to interact with the database.
///
TID_DB,
///
// Used to interact with the file system.
///
TID_FILE,
///
// Used for file system operations that block user interactions.
// Responsiveness of this thread affects users.
///
TID_FILE_USER_BLOCKING,
///
// Used to launch and terminate browser processes.
///
TID_PROCESS_LAUNCHER,
///
// Used to handle slow HTTP cache operations.
///
TID_CACHE,
///
// Used to process IPC and network messages.
///
TID_IO,
// RENDER PROCESS THREADS -- Only available in the render process.
///
// The main thr

博客介绍了如何在CEF框架的特定线程(如TID_UI、TID_RENDER)上执行任务。通过继承CefTask接口或使用base::Bind创建Functor,可以在指定线程上运行代码,例如在Browser进程中弹出窗口。详细步骤和参考资料链接提供在内容中。
最低0.47元/天 解锁文章
1056

被折叠的 条评论
为什么被折叠?



