Skip to content

Commit

Permalink
ppltasks.cpp: Fix bincompat for VS 2015 (microsoft#3255)
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanTLavavej authored Dec 2, 2022
1 parent e28f956 commit 26a1f76
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions stl/src/ppltasks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,13 @@ namespace Concurrency {
}

_CRTIMP2 bool __cdecl _Task_impl_base::_IsNonBlockingThread() {
// TRANSITION, ABI: This preprocessor directive attempts to fix VSO-1684985 (a bincompat issue affecting VS 2015 code)
// while preserving as much of GH-2654 as possible. When we can break ABI, we should:
// * Remove this preprocessor directive - it should be unnecessary after <ppltasks.h> was changed on 2018-01-12.
// * In <ppltasks.h>, reconsider whether _Task_impl_base::_Wait() should throw invalid_operation;
// it's questionable whether that's conforming, and if users want to block their UI threads, we should let them.
// * Investigate whether we can avoid the ppltasks dependency entirely, making all of these issues irrelevant.
#if defined(_CRT_APP) || defined(UNDOCKED_WINDOWS_UCRT)
APTTYPE _AptType;
APTTYPEQUALIFIER _AptTypeQualifier;

Expand Down Expand Up @@ -314,6 +321,8 @@ namespace Concurrency {
break;
}
}
#endif // defined(_CRT_APP) || defined(UNDOCKED_WINDOWS_UCRT)

return false;
}
} // namespace details
Expand Down

0 comments on commit 26a1f76

Please sign in to comment.