concurrency-runtime

VS2010's concurency runtime and unbounded_buffer<shared_ptr<T>>, any pitfalls?

时光总嘲笑我的痴心妄想 提交于 2020-01-04 02:33:09
问题 I want to pass heap-allocated objects from a dll. Obviously, memory must be managed correctly. Does anyone see a problem with the following cunning scheme I devised: unbounded_buffer<shared_ptr<T>> buf; I am aware that shared_ptr stashes away a deleter for the contained object, so using it alone across dll boundaries shouldn't be a problem. 回答1: Here's what I received from MSFT regarding the issue: Yes, you can use the message blocks (like unbounded_buffer) on thread that are manually created

'Concurrency': a namespace with this name does not exist

*爱你&永不变心* 提交于 2019-12-11 18:06:48
问题 I am an amateur C# programmer who strayed into C++ because of a need for the C++ AMP technology for some heavy-duty number crunching. Hence, my C++ programming skills are not very well developed. For my first attempt at an actual program, I chose code based on a Daniel Moth's April 2012 article. I cannot get it to build. I always get the error: C2871 ‘Concurrency’: a namespace with this name does not exist. I know that the code was first written for Visual Studio 11, but I only had VS 2008

C++ Wait But Allow Events To Fire

蹲街弑〆低调 提交于 2019-12-11 12:02:29
问题 Building a SignalR C++ client using Visual Studio 2013, I am starting with the working sample code from NuGet Package Microsoft.AspNet.SignalR.Client.Cpp.v120.WinDesktop , source here Reviewing the library source it seems to me the event handling processes are based on the Concurrency Runtime (pplx::task) which relies on C++11 features void chat(const utility::string_t& name) { signalr::hub_connection connection{ U("https://testsite") }; auto proxy = connection.create_hub_proxy(U("ChatHub"));

Exception handling, WinRT C++ concurrency async tasks

南笙酒味 提交于 2019-11-28 05:53:51
问题 I have to implement an async HTTP GET in C++ and we have to be able to submit the app to the Windows 8 Store. My problem is the following: I've found a suitable Sample code which implements an HttpRequest class http://code.msdn.microsoft.com/windowsapps/HttpClient-sample-55700664 This example works if the URI is correct but throws an exception if the URI points to an invalid / non existing place (like: www.google22.com). This would be fine if I could catch the exception but I cannot figure it