-
-
Notifications
You must be signed in to change notification settings - Fork 480
Closed
Labels
Description
Fix was already added in commits d9bbf7c and 8d2c1e7, but this might not be enough.
In upstream cefclient there is a 0.05 sec sleep before each call to message loop work, so that CEF has time to process it. Looks like we also need to add it in CEF Python. I thought CefDoMessageLoopWork() was blocking, but if the sleep is required, then it means that it executes asynchronously and returns immediately.
// We need to run the message pump until it is idle. However we don't have
// that information here so we run the message loop "for a while".
for (int i = 0; i < 10; ++i) {
// Do some work.
CefDoMessageLoopWork();
// Sleep to allow the CEF proc to do work.
usleep(50000);
}
In discussion [2] Marshall states that this will hopefully be fixed as part of Issue 1805 (external message pump). So if message loop work is implemented using external pump maybe this fix won't be required any more - needs testing.
Related forum discussions: