Skip to content

Linux: Support for multi-threaded message loop mode #480

Open
@cztomczak

Description

@cztomczak

This feature is available in upstream CEF v69+.

  1. The new code is in tests/cefclient/browser/main_message_loop_multithreaded_gtk.cc file. This code needs to be copied to src/subprocess/main_message_loop/ in cefpython and then the MainMessageLoopMultithreadedGtk class and its methods need to be exposed. There is already the src/extern/main_message_loop.pxd file that exposes related API for external message pump.
  2. ScopedGdkThreadsEnter C++ object needs to be exposed. Use it with the with statement and implement __enter__ and __exit__ methods for the Python object.
  3. Dialogs default implementation needs to be updated
  4. Print handler default implementation needs to be updated
  5. Implementing multi threaded message loop might be easiest to do in the hello_world.py example. Other examples will require more work. However it is not guaranteed that it can even work with the hello_world.py example, see point 6.
  6. In upstream multi threaded message loop was tested only with cefclient sample application. The hello_world.py example uses CEF API in a way that is not tested in cefclient or cefsimple, so you can't know if it will work in hello_world.py after exposing MainMessageLoopMultithreadedGtk class.

Upstream:

Related: #453 ("Create multithreaded Hello World example")

To run upstream cefclient in multi threaded mode type:

./cefclient --multi-threaded-message-loop

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions