diff options
author | Benoit Foucher <benoit@zeroc.com> | 2018-12-27 18:34:51 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2018-12-27 18:34:51 +0100 |
commit | d57bd8450ed96196f11f7e7f024a75a182750632 (patch) | |
tree | d3f307542071c2ea81db67326150bab42d44ca43 /cpp/test/uwp/controller/ControllerView.xaml.cpp | |
parent | CHANGELOG updates (diff) | |
download | ice-d57bd8450ed96196f11f7e7f024a75a182750632.tar.bz2 ice-d57bd8450ed96196f11f7e7f024a75a182750632.tar.xz ice-d57bd8450ed96196f11f7e7f024a75a182750632.zip |
Thread safe redirect for controller applications
Diffstat (limited to 'cpp/test/uwp/controller/ControllerView.xaml.cpp')
-rw-r--r-- | cpp/test/uwp/controller/ControllerView.xaml.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/cpp/test/uwp/controller/ControllerView.xaml.cpp b/cpp/test/uwp/controller/ControllerView.xaml.cpp index 4d17ef2960b..2a118ee658b 100644 --- a/cpp/test/uwp/controller/ControllerView.xaml.cpp +++ b/cpp/test/uwp/controller/ControllerView.xaml.cpp @@ -131,6 +131,8 @@ private: shared_ptr<Test::Common::ProcessControllerRegistryPrx> _registry; }; +Test::StreamHelper streamRedirect; + } ControllerHelperI::ControllerHelperI(const string& dll, const StringSeq& args) : @@ -199,10 +201,13 @@ ControllerHelperI::run() argv[i] = const_cast<char*>(_args[i].c_str()); } argv[_args.size()] = 0; + + if(_dll.find("client") != string::npos || _dll.find("collocated") != string::npos) + { + streamRedirect.setControllerHelper(this); + } try { - StreamHelper streamHelper(this, - _dll.find("client") != string::npos || _dll.find("collocated") != string::npos); auto helper = unique_ptr<Test::TestHelper>(createHelper()); helper->setControllerHelper(this); helper->run(static_cast<int>(_args.size()), argv); @@ -218,6 +223,10 @@ ControllerHelperI::run() print("unexpected unknown exception while running `" + _args[0] + "'"); completed(1); } + if(_dll.find("client") != string::npos || _dll.find("collocated") != string::npos) + { + streamRedirect.setControllerHelper(0); + } delete[] argv; }); _thread = move(t); |