You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
cztomczak
changed the title
CEF shutdown issues - 10 calls to CefDoMessageLoopWork required before shutdown
CEF shutdown errors - 10 calls to CefDoMessageLoopWork required before shutdown
Jul 22, 2016
Additional changes commited in bfc0a25 as part of Issue #282 ("Not a clean shutdown in examples, when closing app while browser is still loading a website"). Related comments and new code here:
# Run some message loop work, force closing browsers and then run
.
cztomczak
changed the title
CEF shutdown errors - 10 calls to CefDoMessageLoopWork required before shutdown
Multiple calls to CefDoMessageLoopWork required before shutdown. Test with External Message Pump.
Feb 24, 2017
Keeping this still Open - maybe these additional calls with sleep shouldn't be executed when using external message pump (#246). Pump was already implemented, but it actually makes app x2 slower on Linux, it's a bug in ustream.
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.
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:
The text was updated successfully, but these errors were encountered: