Open
Description
This feature is available in upstream CEF v69+.
- The new code is in
tests/cefclient/browser/main_message_loop_multithreaded_gtk.cc
file. This code needs to be copied tosrc/subprocess/main_message_loop/
in cefpython and then theMainMessageLoopMultithreadedGtk
class and its methods need to be exposed. There is already thesrc/extern/main_message_loop.pxd
file that exposes related API for external message pump. - ScopedGdkThreadsEnter C++ object needs to be exposed. Use it with the
with
statement and implement__enter__
and__exit__
methods for the Python object. - Dialogs default implementation needs to be updated
- Print handler default implementation needs to be updated
- 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.
- 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:
- Issue: https://bitbucket.org/chromiumembedded/cef/issues/2512/linux-add-support-for-multi-threaded
- Commit: https://bitbucket.org/chromiumembedded/cef/commits/8aa4b7a
Related: #453 ("Create multithreaded Hello World example")
To run upstream cefclient in multi threaded mode type:
./cefclient --multi-threaded-message-loop