If ANSI C ++ does not support multithreading, how will unmanaged C ++ applications be multithreaded?

I heard that C ++ does not support native multithreading support. I believe that C ++ multithreaded applications depended on managed code for multithreading; this is, for example, a Visual C ++ application that uses MFC or .NET, or something like that to enable multithreading. I also assume that some or all of these managed code features are not available for unmanaged applications. But I read about unmanaged multithreaded applications. How is this possible? Which of my assumptions is false?

+3
source share
8 answers

It is completely operating system dependent to provide support for multithreading. In Windows, the required functionality is available through the Win32 API. Frames such as MFC provide a wrapper for low-level streaming functions to simplify them, although, of course, .NET / CLR has its own managed interface for accessing Win32 multithreading capabilities.

A good explanation is provided in this article (C ++ multithreading).

Why doesn't C ++ support native multithreading support?

++ . , . , Java # , ++. - , ++. .

, ++ " " . ++ , . , , . , , .

+12

++ .

, ++ , ++ API .

++, . ++.

+4

. ( win32, .NET) . . ontop ++, "":) - pthreads, . MSDN.

+3

ISO ++ . , . , , , .

, ISO ++ . , , . ISO ++ UTF-8, -1, , Latin-1.

+2

Native ++ , . , , . " " , ++ MT, , , , " MT", . MFC .NET - , / - API Win32. ++ , , MT- (.. ..), .

+1

Java, JVM, ++ ( C). , . , , , .

0

, "" . "" - , "Microsoft", .NET , , .NET. "" , .NET. MFC ""; Win32 API ( API, Windows).

.NET( ) - API, "" . , , , "" , "" , ( , ). "" , , - "" . API , , , , ( , , -. concurrency)

The C ++ standard does not currently define streams (the next C ++ 1x standard is coming). There are many different thread libraries, including those provided by Win32 and MFC, the pthreads library found on POSIX systems, and Boost.Thread, which will use the platform's local thread stream library.

0
source

The next C ++ standard (called C ++ 0x) will support multithreading. Will include atomic operations.

0
source

Source: https://habr.com/ru/post/1708047/


All Articles