diff options
author | Jose <jose@zeroc.com> | 2018-03-14 17:30:35 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2018-03-14 17:30:35 +0100 |
commit | 9f98e495d71e07bf4945b470f02612b8b4a02174 (patch) | |
tree | 9a099a5d51cba523b7e0e976e2677238cc783cbb /cpp/test/uwp/controller/ViewController.xaml.cpp | |
parent | MATLAB build failure with multiple MATLAB versions in PATH (diff) | |
download | ice-9f98e495d71e07bf4945b470f02612b8b4a02174.tar.bz2 ice-9f98e495d71e07bf4945b470f02612b8b4a02174.tar.xz ice-9f98e495d71e07bf4945b470f02612b8b4a02174.zip |
Serialize loading and unloading of UWP test DLLs
Diffstat (limited to 'cpp/test/uwp/controller/ViewController.xaml.cpp')
-rw-r--r-- | cpp/test/uwp/controller/ViewController.xaml.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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 <iostream> #include <memory> #include <condition_variable> -#include <mutex> using namespace std; using namespace Controller; @@ -487,6 +486,7 @@ ViewController::println(const string& s) HINSTANCE ViewController::loadDll(const string& name) { + unique_lock<mutex> lock(_mutex); map<string, pair<HINSTANCE, unsigned int>>::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<mutex> lock(_mutex); map<string, pair<HINSTANCE, unsigned int>>::iterator p = _dlls.find(name); assert(p != _dlls.end()); if(--p->second.second == 0) |