is it possible that casablanca use in synchronous method?

Dec 29, 2014 at 5:18 AM
Edited Dec 29, 2014 at 5:21 AM
is it possible ?how do i used casablanca in synchronous method?im a windows developer,i have searched google,but there is no answer yet,the samples are using in asynchronous addtion,is it possible that i could get a retrun value from asynchronous method which use the casablanca ?
best regards
Dec 30, 2014 at 6:42 PM
Hi Ken,

In the C++ Rest SDK all long running or potentially blocking operations are asynchronous and return a task. With a task you decide on when it is important for your application to wait for the result of the operation. If you want to make your program synchronous go ahead and call task::get() to block and retrieve the value. I sounds like you might be new to programming with tasks, I recommend you take a look at this msdn page on how to task based parallelism.

Dec 31, 2014 at 4:30 AM
Edited Jan 1, 2015 at 4:01 AM
thanks steve,the web page is helpful.
Jan 1, 2015 at 3:35 AM
Edited Jan 1, 2015 at 4:03 AM
may i ask one more question?does Casablanca support win xp?it seems not,i tried to set target xp in project properties,however the application doesnt work in xp
Jan 1, 2015 at 9:13 PM
Yes XP is supported with VS 2012 and VS 2013. You need to set the platform toolset to target XP in the project properties.