{"id":5307,"date":"2017-08-31T07:06:58","date_gmt":"2017-08-31T07:06:58","guid":{"rendered":"https:\/\/www.modernescpp.com\/index.php\/i-m-prooudly-present-i-m-ready-with-my-book-concurrency-with-modern-c\/"},"modified":"2017-08-31T07:06:58","modified_gmt":"2017-08-31T07:06:58","slug":"i-m-prooudly-present-i-m-ready-with-my-book-concurrency-with-modern-c","status":"publish","type":"post","link":"https:\/\/www.modernescpp.com\/index.php\/i-m-prooudly-present-i-m-ready-with-my-book-concurrency-with-modern-c\/","title":{"rendered":"I Proudly present my Book is Ready &#8220;Concurrency with Modern C++&#8221;"},"content":{"rendered":"<div class=\"about-book__copy\" data-reactid=\".1xnjyavcfow.2.1.0.6.0.1.1\">\n<p>Concurrency with Modern C++ is a journey through current and upcoming concurrency in C++.<\/p>\n<ul>\n<li><strong>C++11<\/strong> and <strong>C++14 <\/strong>have the basic building blocks for creating concurrent or parallel programs.<\/li>\n<li>With <strong>C++17<\/strong> we got the parallel algorithms of the Standard Template Library (STL). That means, most of the algorithms of the STL can be executed sequential, parallel, or vectorized.<\/li>\n<li>The concurrency story in C++ goes on. With <strong>C++20<\/strong> we can hope for extended futures, coroutines, transactions, and more.<\/li>\n<\/ul>\n<p><!--more--><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/leanpub.com\/concurrencywithmodernc\"><img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-5292\" src=\"https:\/\/www.modernescpp.com\/wp-content\/uploads\/2017\/08\/ConcurrencyCoverFrame.png\" alt=\"ConcurrencyCoverFrame\" width=\"700\" height=\"901\" srcset=\"https:\/\/www.modernescpp.com\/wp-content\/uploads\/2017\/08\/ConcurrencyCoverFrame.png 991w, https:\/\/www.modernescpp.com\/wp-content\/uploads\/2017\/08\/ConcurrencyCoverFrame-233x300.png 233w, https:\/\/www.modernescpp.com\/wp-content\/uploads\/2017\/08\/ConcurrencyCoverFrame-796x1024.png 796w, https:\/\/www.modernescpp.com\/wp-content\/uploads\/2017\/08\/ConcurrencyCoverFrame-768x988.png 768w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/a><\/p>\n<h2>How to Get it?<\/h2>\n<p>Use the link: <a href=\"https:\/\/leanpub.com\/concurrencywithmodernc\">Leanpub.com: Concurrency with Modern C++<\/a><\/p>\n<h2>What&#8217;s Inside?<\/h2>\n<p>This book <strong>explains you the details to concurrency<\/strong> in modern C++ and gives you, in addition,<strong> more than 100 running code examples<\/strong>. Therefore you can combine the theory with the practices and get the most of it.<\/p>\n<p>Because this book is about concurrency, I<strong> present a lot of pitfalls and show you how to overcome them<\/strong>.<\/p>\n<h2>Give me the Details!<\/h2>\n<p>If you are curious and you should be, here are the details to the more than 300 pages:<\/p>\n<ul>\n<li>Introduction\n<ul>\n<li>Conventions<\/li>\n<li>Source Code\n<ul>\n<li>Run the Programs<\/li>\n<\/ul>\n<\/li>\n<li>How you should read the book?<\/li>\n<li>Personal Notes\n<ul>\n<li>Acknowledgements<\/li>\n<li>About Me<\/li>\n<li>My Special Circumstances<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>A Quick Overview\n<ul>\n<li>Concurrency with Modern C++\n<ul>\n<li>C++11 and C++14: The foundation\n<ul>\n<li>Memory Model<\/li>\n<li>Multithreading<\/li>\n<\/ul>\n<\/li>\n<li>Case Studies\n<ul>\n<li>Calculating the Sum of a Vector<\/li>\n<li>Thread-Safe Initialisation of a Singleton<\/li>\n<li>Ongoing Optimisation with CppMem<\/li>\n<\/ul>\n<\/li>\n<li>C++17: Parallel Algorithms of the Standard Template Library\n<ul>\n<li>Execution Policy<\/li>\n<li>New Algorithms<\/li>\n<\/ul>\n<\/li>\n<li>C++20: The Concurrent Future\n<ul>\n<li>Atomic Smart Pointers<\/li>\n<li>Extended futures<\/li>\n<li>Latches and Barriers<\/li>\n<li>Coroutines<\/li>\n<li>Transactional Memory<\/li>\n<li>Task Blocks<\/li>\n<\/ul>\n<\/li>\n<li>Challenges<\/li>\n<li>Best Practices<\/li>\n<li>Time Library<\/li>\n<li>Glossary<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>The Details\n<ul>\n<li>Memory Model\n<ul>\n<li>The Contract\n<ul>\n<li>The Foundation<\/li>\n<li>The Challenges<\/li>\n<\/ul>\n<\/li>\n<li>Atomics\n<ul>\n<li>Strong versus Weak Memory Model<\/li>\n<li>The Atomic Flag<\/li>\n<li>The Class Template <code>std::atomic<\/code><\/li>\n<li>User Defined Atomics<\/li>\n<li>All Atomic Operations<\/li>\n<li>Free Atomic Functions<\/li>\n<li><code>std::shared_ptr<\/code><\/li>\n<\/ul>\n<\/li>\n<li>The Synchronisation and Ordering Constraints\n<ul>\n<li>The six variants of the C++ memory model<\/li>\n<li>Sequential Consistency<\/li>\n<li>Acquire-Release Semantic<\/li>\n<li>std::memory_order_consume<\/li>\n<li>Relaxed Semantic<\/li>\n<\/ul>\n<\/li>\n<li>Fences\n<ul>\n<li>Fences as Memory Barriers<\/li>\n<li>The three Fences<\/li>\n<li>Acquire-Release Fences<\/li>\n<li>Synchronisation with Atomic Variables or Fences<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>Multithreading\n<ul>\n<li>Threads\n<ul>\n<li>Creation<\/li>\n<li>Lifetime<\/li>\n<li>Arguments<\/li>\n<li>Methods<\/li>\n<\/ul>\n<\/li>\n<li>Shared Data\n<ul>\n<li>Mutexes<\/li>\n<li>Locks<\/li>\n<li>Thread-safe Initialisation<\/li>\n<\/ul>\n<\/li>\n<li>Thread-Local Data<\/li>\n<li>Condition Variables\n<ul>\n<li>The Wait Workflow<\/li>\n<li>Lost Wakeup and Spurious Wakeup<\/li>\n<\/ul>\n<\/li>\n<li>Tasks\n<ul>\n<li>Threads versus Tasks<\/li>\n<li>std::async<\/li>\n<li>std::packaged_task<\/li>\n<li>std::promise and std::future<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>Case Studies\n<ul>\n<li>Calculating the Sum of a Vector\n<ul>\n<li>Single Threaded addition of a Vector<\/li>\n<li>Multithreaded Summation with a Shared Variable<\/li>\n<li>Thread-Local Summation<\/li>\n<li>Summation of a Vector: The Conclusion<\/li>\n<\/ul>\n<\/li>\n<li>Thread-Safe Initialisation of a Singleton\n<ul>\n<li>Double-Checked Locking Pattern<\/li>\n<li>My Strategy<\/li>\n<li>Thread-Safe Meyers Singleton<\/li>\n<li><code>std::call_once<\/code> with the <code>std::once_flag<\/code><\/li>\n<li>Atomics<\/li>\n<li>Performance Numbers of the various Thread-Safe Singleton Implementations<\/li>\n<\/ul>\n<\/li>\n<li>Ongoing Optimisation with CppMem\n<ul>\n<li>CppMem &#8211; An Overview<\/li>\n<li>CppMem: Non-Atomic Variables<\/li>\n<li>CppMem: Locks<\/li>\n<li>CppMem: Atomics with Sequential Consistency<\/li>\n<li>CppMem: Atomics with Acquire-Release Semantic<\/li>\n<li>CppMem: Atomics with Non-atomics<\/li>\n<li>CppMem: Atomics with Relaxed Semantic<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>Parallel Algorithms of the Standard Template Library\n<ul>\n<li>Execution Policies<\/li>\n<li>Algorithms\n<ul>\n<li>The functional Heritage<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>The Future: C++20\n<ul>\n<li>Atomic Smart Pointers\n<ul>\n<li>A thread-safe singly linked list<\/li>\n<\/ul>\n<\/li>\n<li>Extended Futures\n<ul>\n<li><code>std::future<\/code><\/li>\n<li><code>std::async<\/code>, <code>std::packaged_task<\/code>, and <code>std::promise<\/code><\/li>\n<li>Creating new Futures<\/li>\n<\/ul>\n<\/li>\n<li>Latches and Barriers\n<ul>\n<li><code>std::latch<\/code><\/li>\n<li><code>std::barrier<\/code><\/li>\n<li><code>std::flex_barrier<\/code><\/li>\n<\/ul>\n<\/li>\n<li>Coroutines\n<ul>\n<li>A Generator Function<\/li>\n<li>Details<\/li>\n<\/ul>\n<\/li>\n<li>Transactional Memory\n<ul>\n<li>ACI(D)<\/li>\n<li>Synchronized and Atomic Blocks<\/li>\n<li><code>transaction_safe<\/code> versus <code>transaction_unsafe<\/code> Code<\/li>\n<\/ul>\n<\/li>\n<li>Task Blocks\n<ul>\n<li>Fork and Join<\/li>\n<li><code>define_task_block<\/code> versus <code>define_task_block_restore_thread<\/code><\/li>\n<li>The Interface<\/li>\n<li>The Scheduler<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>Further Information\n<ul>\n<li>Challenges\n<ul>\n<li>ABA<\/li>\n<li>Blocking Issues<\/li>\n<li>Breaking of Program Invariants<\/li>\n<li>Data Races<\/li>\n<li>False Sharing<\/li>\n<li>Lifetime Issues of Variables<\/li>\n<li>Moving Threads<\/li>\n<li>Deadlocks<\/li>\n<li>Race Conditions<\/li>\n<\/ul>\n<\/li>\n<li>Best Practices\n<ul>\n<li>General\n<ul>\n<li>Code Reviews<\/li>\n<li>Minimise Data Sharing of mutable data<\/li>\n<li>Minimise Waiting<\/li>\n<li>Prefer Immutable Data<\/li>\n<li>Look for the Right Abstraction<\/li>\n<li>Use Static Code Analysis Tools<\/li>\n<\/ul>\n<\/li>\n<li>Memory Model\n<ul>\n<li>Don\u2019t use volatile for synchronisation<\/li>\n<li>Don\u2019t program Lock Free<\/li>\n<li>If you program Lock-Free, use well-established patterns<\/li>\n<li>Don\u2019t build your own abstraction, use guarantees of the language<\/li>\n<\/ul>\n<\/li>\n<li>Multithreading\n<ul>\n<li>Threads<\/li>\n<li>Data Sharing<\/li>\n<li>Condition Variables<\/li>\n<li>Promises and Futures<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>The Time Library\n<ul>\n<li>The Interplay of Time Point, Time Duration, and Clock<\/li>\n<li>Time Point\n<ul>\n<li>From Time Point to Calendar Time<\/li>\n<li>Cross the valid Time Range<\/li>\n<\/ul>\n<\/li>\n<li>Time Duration\n<ul>\n<li>Calculations<\/li>\n<\/ul>\n<\/li>\n<li>Clocks\n<ul>\n<li>Accuracy and Steadiness<\/li>\n<li>Epoch<\/li>\n<\/ul>\n<\/li>\n<li>Sleep and Wait<\/li>\n<\/ul>\n<\/li>\n<li>Glossary\n<ul>\n<li>ACID<\/li>\n<li>Callable Unit<\/li>\n<li>Concurrency<\/li>\n<li>Critical Section<\/li>\n<li>Function Objects<\/li>\n<li>Lambda Functions<\/li>\n<li>Lock-free<\/li>\n<li>Lost Wakeup<\/li>\n<li>Modification Order<\/li>\n<li>Monad<\/li>\n<li>Non-blocking<\/li>\n<li>Parallelism<\/li>\n<li>Predicate<\/li>\n<li>RAII<\/li>\n<li>Sequential Consistency<\/li>\n<li>Sequence Point<\/li>\n<li>Spurious Wakeup<\/li>\n<li>Thread<\/li>\n<li>Total order<\/li>\n<li>volatile<\/li>\n<li>wait-free<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>Index<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Modernes C++,<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-4721\" src=\"https:\/\/www.modernescpp.com\/wp-content\/uploads\/2016\/04\/RainerGrimmSmall.png\" alt=\"RainerGrimmSmall\" width=\"222\" height=\"66\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<\/div>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Concurrency with Modern C++ is a journey through current and upcoming concurrency in C++. C++11 and C++14 have the basic building blocks for creating concurrent or parallel programs. With C++17 we got the parallel algorithms of the Standard Template Library (STL). That means, most of the algorithms of the STL can be executed sequential, parallel, [&hellip;]<\/p>\n","protected":false},"author":21,"featured_media":5292,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[360],"tags":[],"class_list":["post-5307","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news"],"_links":{"self":[{"href":"https:\/\/www.modernescpp.com\/index.php\/wp-json\/wp\/v2\/posts\/5307","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.modernescpp.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.modernescpp.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.modernescpp.com\/index.php\/wp-json\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/www.modernescpp.com\/index.php\/wp-json\/wp\/v2\/comments?post=5307"}],"version-history":[{"count":0,"href":"https:\/\/www.modernescpp.com\/index.php\/wp-json\/wp\/v2\/posts\/5307\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.modernescpp.com\/index.php\/wp-json\/wp\/v2\/media\/5292"}],"wp:attachment":[{"href":"https:\/\/www.modernescpp.com\/index.php\/wp-json\/wp\/v2\/media?parent=5307"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.modernescpp.com\/index.php\/wp-json\/wp\/v2\/categories?post=5307"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.modernescpp.com\/index.php\/wp-json\/wp\/v2\/tags?post=5307"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}