Fix ForeignThreadExceptions test (#25074)
authorJan Vorlicek <janvorli@microsoft.com>
Tue, 11 Jun 2019 22:42:46 +0000 (00:42 +0200)
committerJan Kotas <jkotas@microsoft.com>
Tue, 11 Jun 2019 22:42:46 +0000 (15:42 -0700)
commit1eee9e5338118aeb6afa199658b2fdd4f318414e
tree5ffa2019bfd69bcd7f8c3d0bc450e1fac85a3cb0
parent96c8a1259f5605f52a4d08d804c5f0cdb59308b2
Fix ForeignThreadExceptions test (#25074)

This test creates a native thread on which it calls a managed callback. It uses
std::thread to create the thread. The problem is that on MUSL based Linux distros,
the default stack size for secondary threads is 80kB, which is not enough for this
test.
Since std::thread has no way to set the thread stack size, the fix is to use
pthreads on Unix and keep the std::thread for Windows only.
tests/src/Exceptions/ForeignThread/CMakeLists.txt
tests/src/Exceptions/ForeignThread/ForeignThreadExceptionsNative.cpp