Movatterモバイル変換


[0]ホーム

URL:


Packt
Search iconClose icon
Search icon CANCEL
Subscription
0
Cart icon
Your Cart(0 item)
Close icon
You have no products in your basket yet
Save more on your purchases!discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Profile icon
Account
Close icon

Change country

Modal Close icon
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timerSALE ENDS IN
0Days
:
00Hours
:
00Minutes
:
00Seconds
Home> Programming> Programming Language> Asynchronous Programming with C++
Asynchronous Programming with C++
Asynchronous Programming with C++

Asynchronous Programming with C++: Build blazing-fast software with multithreading and asynchronous programming for ultimate efficiency

Arrow left icon
Profile Icon Javier Reguera-SalgadoProfile Icon Juan Antonio Rufes
Arrow right icon
€31.99
Full star iconFull star iconFull star iconFull star iconFull star icon5(1 Ratings)
PaperbackNov 2024424 pages1st Edition
eBook
€8.98 €25.99
Paperback
€31.99
Subscription
Free Trial
Renews at €18.99p/m
Arrow left icon
Profile Icon Javier Reguera-SalgadoProfile Icon Juan Antonio Rufes
Arrow right icon
€31.99
Full star iconFull star iconFull star iconFull star iconFull star icon5(1 Ratings)
PaperbackNov 2024424 pages1st Edition
eBook
€8.98 €25.99
Paperback
€31.99
Subscription
Free Trial
Renews at €18.99p/m
eBook
€8.98 €25.99
Paperback
€31.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with Print?

Product feature iconInstant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature iconDRM FREE - Read whenever, wherever and however you want
Product feature iconAI Assistant (beta) to help accelerate your learning

Contact Details

Modal Close icon
Payment Processing...
tickCompleted

Shipping Address

Billing Address

Shipping Methods
Table of content iconView table of contentsPreview book icon Preview Book

Asynchronous Programming with C++

Part 1:Foundations of Parallel Programming and Process Management

In this part, we delve into the fundamental concepts and paradigms that form the foundation of parallel programming and process management. You will gain a deep understanding of the architectures used to build parallel systems and explore the various programming paradigms available for developing efficient parallel, multithreading, and asynchronous software. Additionally, we will cover critical concepts related to processes, threads, and services, highlighting their importance in operating systems, especially in the context of process life cycle, performance, andresource management.

This part has thefollowing chapters:

Left arrow icon

Page1 of 1

Right arrow icon
Download code iconDownload Code

Key benefits

  • Learn how to use modern C++ features, including futures, promises, async, and coroutines to build asynchronous solutions
  • Develop cross-platform network and low-level I/O projects with Boost.Asio
  • Master optimization techniques by understanding how software adapts to machine hardware
  • Purchase of the print or Kindle book includes a free PDF eBook

Description

As hardware advancements continue to accelerate, bringing greater memory capacity and more CPU cores, software must evolve to adapt to efficiently use all available resources and reduce idle CPU cycles. In this book, two seasoned software engineers with about five decades of combined experience will teach you how to implement concurrent and asynchronous solutions in C++.You’ll gain a comprehensive understanding of parallel programming paradigms—covering concurrent, asynchronous, parallel, multithreading, reactive, and event-driven programming, as well as dataflows—and see how threads, processes, and services are related. Moving into the heart of concurrency, the authors will guide you in creating and managing threads and exploring C++’s thread-safety mechanisms, including mutual exclusion, atomic operations, semaphores, condition variables, latches, and barriers. With this solid foundation, you’ll focus on pure asynchronous programming, discovering futures, promises, the async function, and coroutines. The book takes you step by step through using Boost.Asio and Boost.Cobalt to develop network and low-level I/O solutions, proven performance and optimization techniques, and testing and debugging asynchronous software.By the end of this C++ book, you’ll be able to implement high-performance software using modern asynchronous C++ techniques.

Who is this book for?

This book is for developers who have some experience using C++, regardless of their professional field. If you want to improve your C++ skills and learn how to develop high-performance software using the latest modern C++ features, this book is for you.

What you will learn

  • Explore the different parallel paradigms and know when to apply them
  • Acquire deep knowledge of thread management and safety mechanisms
  • Understand asynchronous programming in C++, including coroutines
  • Leverage network asynchronous programming by using Boost.Asio and Boost.Cobalt
  • Add proven performance and optimization techniques to your toolbox
  • Find out how to test and debug asynchronous software
Estimated delivery feeDeliver to Netherlands

Premium delivery7 - 10 business days

€17.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date :Nov 29, 2024
Length:424 pages
Edition :1st
Language :English
ISBN-13 :9781835884249
Category :
Languages :

What do you get with Print?

Product feature iconInstant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature iconDRM FREE - Read whenever, wherever and however you want
Product feature iconAI Assistant (beta) to help accelerate your learning

Contact Details

Modal Close icon
Payment Processing...
tickCompleted

Shipping Address

Billing Address

Shipping Methods
Estimated delivery feeDeliver to Netherlands

Premium delivery7 - 10 business days

€17.95
(Includes tracking information)

Product Details

Publication date :Nov 29, 2024
Length:424 pages
Edition :1st
Language :English
ISBN-13 :9781835884249
Category :
Languages :
Concepts :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99billed monthly
Feature tick iconUnlimited access to Packt's library of 7,000+ practical books and videos
Feature tick iconConstantly refreshed with 50+ new titles a month
Feature tick iconExclusive Early access to books as they're written
Feature tick iconSolve problems while you work with advanced search and reference features
Feature tick iconOffline reading on the mobile app
Feature tick iconSimple pricing, no contract
€189.99billed annually
Feature tick iconUnlimited access to Packt's library of 7,000+ practical books and videos
Feature tick iconConstantly refreshed with 50+ new titles a month
Feature tick iconExclusive Early access to books as they're written
Feature tick iconSolve problems while you work with advanced search and reference features
Feature tick iconOffline reading on the mobile app
Feature tick iconChoose a DRM-free eBook or Video every month to keep
Feature tick iconPLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick iconExclusive print discounts
€264.99billed in 18 months
Feature tick iconUnlimited access to Packt's library of 7,000+ practical books and videos
Feature tick iconConstantly refreshed with 50+ new titles a month
Feature tick iconExclusive Early access to books as they're written
Feature tick iconSolve problems while you work with advanced search and reference features
Feature tick iconOffline reading on the mobile app
Feature tick iconChoose a DRM-free eBook or Video every month to keep
Feature tick iconPLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick iconExclusive print discounts
Buy 2+ to unlock€6.99 prices - master what's next.
SHOP NOW

Table of Contents

20 Chapters
Part 1:Foundations of Parallel Programming and Process ManagementChevron down iconChevron up icon
Part 1:Foundations of Parallel Programming and Process Management
Chapter 1: Parallel Programming ParadigmsChevron down iconChevron up icon
Chapter 1: Parallel Programming Paradigms
Technical requirements
Getting to know classifications, techniques, and models
Understanding various parallel programming paradigms
Exploring the metrics to assess parallelism
Summary
Further reading
Chapter 2: Processes, Threads, and ServicesChevron down iconChevron up icon
Chapter 2: Processes, Threads, and Services
Processes in Linux
Services and daemons in Linux
Threads
Synchronization primitives
Common problems when using multiple threads
Strategies for effective thread management
Summary
Further reading
Part 2: Advanced Thread Management and Synchronization TechniquesChevron down iconChevron up icon
Part 2: Advanced Thread Management and Synchronization Techniques
Chapter 3: How to Create and Manage Threads in C++Chevron down iconChevron up icon
Chapter 3: How to Create and Manage Threads in C++
Technical requirements
The thread library – an introduction
Thread operations
Thread-local storage
Implementing a timer
Summary
Further reading
Chapter 4: Thread Synchronization with LocksChevron down iconChevron up icon
Chapter 4: Thread Synchronization with Locks
Technical requirements
Understanding race conditions
Why do we need mutual exclusion?
Generic lock management
Condition variables
Implementing a multithreaded safe queue
Semaphores
Barriers and latches
Performing a task only once
Summary
Further reading
Chapter 5: Atomic OperationsChevron down iconChevron up icon
Chapter 5: Atomic Operations
Technical requirements
Introduction to atomic operations
Non-blocking data structures
The C++ memory model
C++ Standard Library atomic types and operations
SPSC lock-free queue
Summary
Further reading
Part 3: Asynchronous Programming with Promises, Futures, and CoroutinesChevron down iconChevron up icon
Part 3: Asynchronous Programming with Promises, Futures, and Coroutines
Chapter 6: Promises and FuturesChevron down iconChevron up icon
Chapter 6: Promises and Futures
Technical requirements
Exploring promises and futures
The benefits and drawbacks of promises and futures
Examples of real-life scenarios and solutions
Summary
Further reading
Chapter 7: The Async FunctionChevron down iconChevron up icon
Chapter 7: The Async Function
Technical requirements
What is std::async?
Launch policies
Handling exceptions
Async futures and performance
Limiting the number of threads
When not to use std::async
Practical examples
Summary
Further reading
Chapter 8: Asynchronous Programming Using CoroutinesChevron down iconChevron up icon
Chapter 8: Asynchronous Programming Using Coroutines
Technical requirements
Coroutines
C++ coroutines
Implementing basic coroutines
Coroutine generators
Simple coroutine string parser
Coroutines and exceptions
Summary
Further reading
Part 4: Advanced Asynchronous Programming with Boost LibrariesChevron down iconChevron up icon
Part 4: Advanced Asynchronous Programming with Boost Libraries
Chapter 9: Asynchronous Programming Using Boost.AsioChevron down iconChevron up icon
Chapter 9: Asynchronous Programming Using Boost.Asio
Technical requirements
What is Boost.Asio?
Interacting with the OS
The Reactor and Proactor design patterns
Threading with Boost.Asio
Managing objects’ lifetime
Transferring data using buffers
Signal handling
Canceling operations
Serializing workload with strands
Coroutines
Summary
Further reading
Chapter 10: Coroutines with Boost.CobaltChevron down iconChevron up icon
Chapter 10: Coroutines with Boost.Cobalt
Technical requirements
Introducing the Boost.Cobalt library
Boost.Cobalt generators
Boost.Cobalt tasks and promises
Boost.Cobalt channels
Boost.Cobalt synchronization functions
Summary
Further reading
Part 5: Debugging, Testing, and Performance Optimization in Asynchronous ProgrammingChevron down iconChevron up icon
Part 5: Debugging, Testing, and Performance Optimization in Asynchronous Programming
Chapter 11: Logging and Debugging Asynchronous SoftwareChevron down iconChevron up icon
Chapter 11: Logging and Debugging Asynchronous Software
Technical requirements
How to use logging to spot bugs
How to debug asynchronous software
Summary
Further reading
Chapter 12: Sanitizing and Testing Asynchronous SoftwareChevron down iconChevron up icon
Chapter 12: Sanitizing and Testing Asynchronous Software
Technical requirements
Sanitizing code to analyze the software and find potential issues
Testing asynchronous code
Summary
Further reading
Chapter 13: Improving Asynchronous Software PerformanceChevron down iconChevron up icon
Chapter 13: Improving Asynchronous Software Performance
Technical requirements
Performance measurement tools
False sharing
CPU memory cache
SPSC lock-free queue
Summary
Further reading
IndexChevron down iconChevron up icon
Index
Why subscribe?
Other Books You May EnjoyChevron down iconChevron up icon
Other Books You May Enjoy
Packt is searching for authors like you
Share Your Thoughts
Download a free PDF copy of this book

Recommendations for you

Left arrow icon
Debunking C++ Myths
Debunking C++ Myths
Read more
Dec 2024226 pages
Full star icon5 (1)
eBook
eBook
€8.98€23.99
€29.99
Go Recipes for Developers
Go Recipes for Developers
Read more
Dec 2024350 pages
eBook
eBook
€8.98€23.99
€29.99
50 Algorithms Every Programmer Should Know
50 Algorithms Every Programmer Should Know
Read more
Sep 2023538 pages
Full star icon4.5 (64)
eBook
eBook
€8.98€29.99
€37.99
€37.99
Asynchronous Programming with C++
Asynchronous Programming with C++
Read more
Nov 2024424 pages
Full star icon5 (1)
eBook
eBook
€8.98€25.99
€31.99
Modern CMake for C++
Modern CMake for C++
Read more
May 2024504 pages
Full star icon4.7 (13)
eBook
eBook
€8.98€29.99
€37.99
Learn Python Programming
Learn Python Programming
Read more
Nov 2024616 pages
Full star icon3.5 (2)
eBook
eBook
€8.98€23.99
€29.99
Learn to Code with Rust
Learn to Code with Rust
Read more
Sep 202557hrs 40mins
Full star icon5 (1)
Video
Video
€8.98€56.99
Modern Python Cookbook
Modern Python Cookbook
Read more
Jul 2024818 pages
Full star icon4.9 (17)
eBook
eBook
€8.98€32.99
€41.99
Right arrow icon

Customer reviews

Rating distribution
Full star iconFull star iconFull star iconFull star iconFull star icon5
(1 Ratings)
5 star100%
4 star0%
3 star0%
2 star0%
1 star0%
AyoubApr 02, 2025
Full star iconFull star iconFull star iconFull star iconFull star icon5
Fantastic book, if you are new to multithreading and you want a master introduction, this is your friend. Great work.
Subscriber reviewPackt

About the authors

Left arrow icon
Profile icon Javier Reguera-Salgado
Javier Reguera-Salgado
LinkedIn iconGithub icon
Javier Reguera-Salgado is a seasoned software engineer with 19+ years of experience, specializing in high-performance computing, real-time data processing, and communication protocols. Skilled in C++, Python, and a variety of other programming languages and technologies, his work spans low-latency distributed systems, mobile apps, web solutions, and enterprise products. He has contributed to research centers, start-ups, blue-chip companies, and quantitative investment firms in Spain and the UK. Javier holds a PhD cum laude in high-performance computing from the University of Vigo, Spain.
Read more
See other products by Javier Reguera-Salgado
Profile icon Juan Antonio Rufes
Juan Antonio Rufes
LinkedIn icon
Juan Antonio Rufes is a software engineer with 30 years of experience, specializing in low-level and systems programming, primarily in C, C++, 0x86 assembly, and Python. His expertise includes Windows and Linux optimization, Windows kernel drivers for antivirus and encryption, TCP/IP protocol analysis, and low-latency financial systems such as smart order routing and FPGA-based trading systems. He has worked with software companies, investment banks, and hedge funds. Juan holds an MSc in electrical engineering from the Polytechnic University of Valencia, Spain.
Read more
See other products by Juan Antonio Rufes
Right arrow icon
Getfree access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the digital copy I get with my Print order?Chevron down iconChevron up icon

When you buy any Print edition of our Books, you can redeem (for free) the eBook edition of the Print Book you’ve purchased. This gives you instant access to your book when you make an order via PDF, EPUB or our online Reader experience.

What is the delivery time and cost of print book?Chevron down iconChevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium:Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge?Chevron down iconChevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order?Chevron down iconChevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries:www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges?Chevron down iconChevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live inMexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live inTurkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order?Chevron down iconChevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy?Chevron down iconChevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged?Chevron down iconChevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use?Chevron down iconChevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books?Chevron down iconChevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium:Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela

Create a Free Account To Continue Reading

Modal Close icon
OR
    First name is required.
    Last name is required.

The Password should contain at least :

  • 8 characters
  • 1 uppercase
  • 1 number
Notify me about special offers, personalized product recommendations, and learning tips By signing up for the free trial you will receive emails related to this service, you can unsubscribe at any time
By clicking ‘Create Account’, you are agreeing to ourPrivacy Policy andTerms & Conditions
Already have an account? SIGN IN

Sign in to activate your 7-day free access

Modal Close icon
OR
By redeeming the free trial you will receive emails related to this service, you can unsubscribe at any time.

[8]ページ先頭

©2009-2025 Movatter.jp