Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement multi threaded message loop on Windows to improve performance. Create example. #133

Open
GoogleCodeExporter opened this issue Aug 28, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

GoogleCodeExporter commented Aug 28, 2015

UPDATE: It was tested and it is already possible to use multithreaded message loop on Windows. To do so set ApplicationSettings."multi_threaded_message_loop" to True and run a native message loop in your app. Don't call CEF's message loop. Create browser using PostTask(TID_UI, CreateBrowserSync, ...).

Keeping this issue still Open, as it would be nice to have this be shown in one of examples, possibly hello_world.py.

See ApplicationSettings."multi_threaded_message_loop". Multi threaded message loop may help improve performance in some applications. For best performance it is recommended that multi threaded message loop is used instead of external message pump on Windows platform (Issue #246).

It may be useful to implement CefBrowser::CreateBrowser to create browser asynchronously. CreateBrowserSync must be called on the UI thread and when running multi threaded message loop the main thread is no more the UI thread. So it is required to call CreateBrowserSync using PostTask(TID_UI).

See main_message_loop_multithreaded_win.cc in upstream. We could copy this file similarly to how external message pump is implemented.

Original issue reported on code.google.com by [email protected] on 13 Aug 2014 at 8:05

@cztomczak cztomczak changed the title Example of using multi threaded CEF message loop Example of using multi threaded CEF message loop on Windows Feb 11, 2016
@cztomczak cztomczak changed the title Example of using multi threaded CEF message loop on Windows Implement multi threaded message loop on Windows to improve performance Sep 25, 2016
@cztomczak cztomczak changed the title Implement multi threaded message loop on Windows to improve performance Implement multi threaded message loop on Windows to improve performance. Create example. Dec 4, 2016
@cztomczak
Copy link
Owner

cztomczak commented Jan 7, 2018

There is now an official pywin32.py example that uses multi threaded message loop when "--multi-threaded" arg is passed (changedsto thos example will be commited in a few moments).

@cztomczak cztomczak modified the milestone: v66 Aug 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants