From 2d580364a6cfa28477d66a5197afe373ce8823aa Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Tue, 12 Apr 2016 19:24:34 +0300 Subject: [PATCH] [core] Do the MapContext::cleanup() synchronously This used to be async assuming the libuv behavior of holding the main loop until all the messages are processed and also for avoiding a deadlock at exit that no longer exits. Now that we support multiple main loops implementation on different platforms, we do the cleanup synchronously to make sure all the platforms have the same behavior at exit. Fixes #4631 --- src/mbgl/map/map.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp index 4024aaee7..c9123495c 100644 --- a/src/mbgl/map/map.cpp +++ b/src/mbgl/map/map.cpp @@ -31,7 +31,7 @@ Map::Map(View& view_, FileSource& fileSource, MapMode mapMode, GLContextMode con Map::~Map() { resume(); - context->invoke(&MapContext::cleanup); + context->invokeSync(&MapContext::cleanup); } void Map::pause() {