diff options
author | Jan Vorlicek <janvorli@microsoft.com> | 2015-11-25 11:04:27 +0100 |
---|---|---|
committer | Jan Vorlicek <janvorli@microsoft.com> | 2015-11-25 13:24:35 +0100 |
commit | a845b01e3688fd981101f953fef41641264d5403 (patch) | |
tree | 4ad80c19338bbe13af93595e152dbe8d71464ce0 /src/vm/corhost.cpp | |
parent | 0279dbd600e14d88cfe87408f08f6adce59d2d8d (diff) | |
download | coreclr-a845b01e3688fd981101f953fef41641264d5403.tar.gz coreclr-a845b01e3688fd981101f953fef41641264d5403.tar.bz2 coreclr-a845b01e3688fd981101f953fef41641264d5403.zip |
Make app shutdown wait for secondary threads
This change makes the CoreCLR behavior the same as the desktop CLR
w.r.t. the app shutdown and secondary threads. Now the application
waits for secondary threads to exit before exiting.
Diffstat (limited to 'src/vm/corhost.cpp')
-rw-r--r-- | src/vm/corhost.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vm/corhost.cpp b/src/vm/corhost.cpp index 4d6515d6d2..bb6404cb38 100644 --- a/src/vm/corhost.cpp +++ b/src/vm/corhost.cpp @@ -1345,7 +1345,7 @@ HRESULT CorHost2::ExecuteAssembly(DWORD dwAppDomainId, arguments->SetAt(i, argument); } - DWORD retval = pAssembly->ExecuteMainMethod(&arguments); + DWORD retval = pAssembly->ExecuteMainMethod(&arguments, TRUE /* waitForOtherThreads */); if (pReturnValue) { *pReturnValue = retval; @@ -2555,7 +2555,7 @@ VOID CorHost2::ExecuteMainInner(Assembly* pRootAssembly) // since this is the thread 0 entry point for AppX apps we use // the EntryPointFilter so that an unhandled exception here will // trigger the same behavior as in classic apps. - pParam->pRootAssembly->ExecuteMainMethod(NULL); + pParam->pRootAssembly->ExecuteMainMethod(NULL, FALSE /* waitForOtherThreads */); } PAL_EXCEPT_FILTER(EntryPointFilter) { |