Re: Using C++11 threads in Visual Studio 2012 CLR applications
On 12/22/2012 5:47 AM, Saeed Amrollahi wrote:
I would like to use C++11 basic threading facility like std::thread
in a C++ CLR project. Unfortunately, the pre-processor issued the following
fatal error: C1189: #error: <thread> is not supported when compiling with
/clr or /clr:pure.
I can't change my project type, because it has to uses the .NET framework
to connect to SQL Server database. What other threading facilities, VS 2012
has for such conditions? PPL, Concurrency Runtime, ...
CLR threads, Windows threads, to name a couple. But...
The 'comp.lang.c++' newsgroup is for discussions on the language, not on
any tools that might bear "C++" in their name or claim to implement C++
compiler. Usually, like in your case, there are other places where you
can discuss those; see http://msdn.microsoft.com/.
FYI, I'm eager to use Native C++11 thread facilities as first and best
option and I'm not interested on using .NET framework threads.
Are you expecting to be commended for [saying] that? What makes you
think that native threading facilities are best?
In your case, the "native facilities" don't seem available. Are you not
interested in accomplishing the ultimate goal - to build your program?
I can't imagine there are no threads in .NET, so the only thing seems to
be stopping you is that you're "not interested". Aside from the desire
to learn the "native facilities", what's directing you *away* from the
truly *native* mechanisms in your *apparent* platform of choice (.NET)?
Learn the tools you have, the native platform means are part of those.
If you learn the language and all library elements, it's good. But
you're going to be limited by [the absence of] their implementation.
It's like saying that you're eager to learn to sail, and not interested
in using a row-boat, while treading water in the middle of the ocean
with a couple row-boats at your disposal.
Either way, best of luck, of course!
I do not respond to top-posted replies, please don't ask