Skip to content

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

Open

Description

@GoogleCodeExporter

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 czarek.t...@gmail.com on 13 Aug 2014 at 8:05

Activity

  1. changed the title [-]Example of using multi threaded CEF message loop[/-] [+]Example of using multi threaded CEF message loop on Windows[/+] on Feb 11, 2016
  2. changed the title [-]Example of using multi threaded CEF message loop on Windows[/-] [+]Implement multi threaded message loop on Windows to improve performance[/+] on Sep 25, 2016
  3. 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.[/+] on Dec 4, 2016
  4. cztomczak commented on Jan 7, 2018

    @cztomczak
    Owner

    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).

  5. modified the milestone: v66 on Aug 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions