Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow ppltasks.h and pplxtasks.h to co-exist #938

Merged
merged 2 commits into from
Nov 3, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions Release/include/pplx/pplxtasks.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,17 @@ namespace std
}
}
#endif /* _MSC_VER < 1700 */
#ifndef _PPLTASK_ASYNC_LOGGING
ioannis-e marked this conversation as resolved.
Show resolved Hide resolved
#if _MSC_VER >= 1800 && defined(__cplusplus_winrt)
#define _PPLTASK_ASYNC_LOGGING 1 // Only enable async logging under dev12 winrt
#else
#define _PPLTASK_ASYNC_LOGGING 0
#endif
#endif /* !_PPLTASK_ASYNC_LOGGING */

#ifndef _PPLTASK_ASYNC_LOGGING
#define _PPLTASK_ASYNC_LOGGING 1
#endif // #ifndef _PPLTASK_ASYNC_LOGGING

#if _PPLTASK_ASYNC_LOGGING
#pragma detect_mismatch("_PPLTASK_ASYNC_LOGGING", "1")
#else
#pragma detect_mismatch("_PPLTASK_ASYNC_LOGGING", "0")
#endif // #if _PPLTASK_ASYNC_LOGGING

#endif /* _MSC_VER */

#pragma pack(push,_CRT_PACKING)
Expand Down Expand Up @@ -1460,7 +1464,7 @@ namespace details
virtual ~_ContinuationTaskHandleBase() {}
};

#if _PPLTASK_ASYNC_LOGGING
#if _PPLTASK_ASYNC_LOGGING && _MSC_VER >= 1800 && defined(__cplusplus_winrt)
ioannis-e marked this conversation as resolved.
Show resolved Hide resolved
// GUID used for identifying causality logs from PPLTask
const ::Platform::Guid _PPLTaskCausalityPlatformID(0x7A76B220, 0xA758, 0x4E6E, 0xB0, 0xE0, 0xD7, 0xC6, 0xD7, 0x4A, 0x88, 0xFE);

Expand Down Expand Up @@ -2379,7 +2383,7 @@ namespace details
_Task_impl_base const & operator=(_Task_impl_base const&);
};

#if _PPLTASK_ASYNC_LOGGING
#if _PPLTASK_ASYNC_LOGGING && _MSC_VER >= 1800 && defined(__cplusplus_winrt)
inline void _TaskEventLogger::_LogTaskCompleted()
{
if (_M_scheduled)
Expand Down