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.
Comments: Fernando, We want that, and there are no technical reasons why PPLX would not work on MacOSX, it's only a matter of finding the time and resources to do this work. It is likely that will add support for Windows XP, Vista and Windows Phone (as other users have repeatedly requested) before we support MacOSX. If we don't do it soon enough, perhaps someone in the community could do this work, which is one of the reasons we went open source. Thanks for your interest, and feel free to use http://casablanca.codeplex.com/discussions for general issues like this one. Artur
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.
Comments: Fernando, We want that, and there are no technical reasons why PPLX would not work on MacOSX, it's only a matter of finding the time and resources to do this work. It is likely that will add support for Windows XP, Vista and Windows Phone (as other users have repeatedly requested) before we support MacOSX. If we don't do it soon enough, perhaps someone in the community could do this work, which is one of the reasons we went open source. Thanks for your interest, and feel free to use http://casablanca.codeplex.com/discussions for general issues like this one. Artur