In the previous chapter, we looked at the threading library introduced by Modern C++ and various ways to create, manage, and synchronize threads. The way of writing code with threads is a rather low level and is prone to potential errors associated with concurrent code (deadlock, live-lock, and so on). Even though it is not noticed by many programmers, the Modern C++ language provides a standard memory model that helps to write concurrent code better. To be a concurrent programming language from the ground up, a language has to provide certain guarantees to the developer regarding memory access and the order in which things will be executed during runtime. If we are using constructs such as mutexes, condition variables, and futures to signal events, one doesn't need to be aware of the memory model. But awareness of the memory...
United States
United Kingdom
India
Germany
France
Canada
Russia
Spain
Brazil
Australia
Argentina
Austria
Belgium
Bulgaria
Chile
Colombia
Cyprus
Czechia
Denmark
Ecuador
Egypt
Estonia
Finland
Greece
Hungary
Indonesia
Ireland
Italy
Japan
Latvia
Lithuania
Luxembourg
Malaysia
Malta
Mexico
Netherlands
New Zealand
Norway
Philippines
Poland
Portugal
Romania
Singapore
Slovakia
Slovenia
South Africa
South Korea
Sweden
Switzerland
Taiwan
Thailand
Turkey
Ukraine