The following example fails to compile because
pplx::task_continuation_context::use_current()
is not defined if the macro __cplusplus_winrt is not defined.
//begin code -------------------
auto t = pplx::create_task( [](){
return printThreadId(1) ? 123 : 0;
});
auto t2 = t.then([]( int i ) -> int
{
printThreadId(2);
printf("Response status code %d returned.\n", i);
return 1;
}, pplx::task_continuation_context::use_current() );
t2.get();
//end code -------------------
I am testing this on Windows 7 64-bits using MSVC 2010 SP1
My desire is to run a continuation in the UI thread not only using WinRT.
Is there any reason why "use_current ()" is only supported using WinRT?
Is there a plan to support it in the future?
Is there any other way to do it now?
Thanks and regards,
Fernando Pelliccioni.
pplx::task_continuation_context::use_current()
is not defined if the macro __cplusplus_winrt is not defined.
//begin code -------------------
auto t = pplx::create_task( [](){
return printThreadId(1) ? 123 : 0;
});
auto t2 = t.then([]( int i ) -> int
{
printThreadId(2);
printf("Response status code %d returned.\n", i);
return 1;
}, pplx::task_continuation_context::use_current() );
t2.get();
//end code -------------------
I am testing this on Windows 7 64-bits using MSVC 2010 SP1
My desire is to run a continuation in the UI thread not only using WinRT.
Is there any reason why "use_current ()" is only supported using WinRT?
Is there a plan to support it in the future?
Is there any other way to do it now?
Thanks and regards,
Fernando Pelliccioni.