From 9f98e495d71e07bf4945b470f02612b8b4a02174 Mon Sep 17 00:00:00 2001 From: Jose Date: Wed, 14 Mar 2018 17:30:35 +0100 Subject: Serialize loading and unloading of UWP test DLLs --- cpp/test/uwp/controller/ViewController.xaml.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cpp/test/uwp/controller/ViewController.xaml.cpp') diff --git a/cpp/test/uwp/controller/ViewController.xaml.cpp b/cpp/test/uwp/controller/ViewController.xaml.cpp index 281e973f519..62ae12cee92 100644 --- a/cpp/test/uwp/controller/ViewController.xaml.cpp +++ b/cpp/test/uwp/controller/ViewController.xaml.cpp @@ -17,7 +17,6 @@ #include #include #include -#include using namespace std; using namespace Controller; @@ -487,6 +486,7 @@ ViewController::println(const string& s) HINSTANCE ViewController::loadDll(const string& name) { + unique_lock lock(_mutex); map>::iterator p = _dlls.find(name); if(p == _dlls.end()) { @@ -500,6 +500,7 @@ ViewController::loadDll(const string& name) void ViewController::unloadDll(const string& name) { + unique_lock lock(_mutex); map>::iterator p = _dlls.find(name); assert(p != _dlls.end()); if(--p->second.second == 0) -- cgit v1.2.3