Concurrency Patterns Irelation between a certain context, a problem, and a solution." (Christopher Alexander)Three Types of Patterns ▪ Architecture pattern ▪ Fundamental structure ▪ Software system ▪ Design pattern ▪ Interplay Known usagesConcurrency Patterns ▪ Pattern-Oriented Software Architecture (Volume 2 and 4) ▪ Concurrent Programming in JavaConcurrency Patterns Synchronization Patterns Dealing with Sharing ▪ Suspension Concurrent Architecture Active Object Monitor Object ReactorConcurrency Patterns Synchronization Patterns Dealing with Sharing ▪ Copied Value ▪ Thread-Specific Storage ▪ Future Dealing0 码力 | 39 页 | 1.14 MB | 6 月前3
Concurrency Patterns in CConcurrency Patterns in Go Artsiom Bukhautsou Senior Backend Engineer @Nord SecurityFan-out 🌱 Pipeline 🤔 Fan-in, Fan-out, Pipeline 🦾 Agenda Fan-in 🌱 Tee 🌱 1. 2. 3. 4. 5.Why learn these these patterns?Fan-inFan-in Pros - Simplifies aggregation - Enhanced throughput Cons - Potential bottleneck Use cases - API response aggregation - Log aggregationFan-in (Example)Fan-outFan-out0 码力 | 20 页 | 1.35 MB | 6 月前3
Sender Patterns to Wrangle Concurrency in Embedded DevicesSender Patterns to Wrangle Sender Patterns to Wrangle Concurrency in Embedded Devices Concurrency in Embedded Devices Michael Caisse Michael Caisse michael.caisse@intel.com michael.caisse@intel.com Ben the count one digit at a time. 3. When done, yell "End of Line" Exercise 7async/concurrency 8async/concurrency GPIO Timer 1 Timer 2 I2C DMA Half-Duplex Serial core 9Sender World View 10Sender (int i) { return std::to_string(i); }) 5 6 ; 7 8 auto r = comp | async::sync_wait(); 9 10 23.2Patterns 24Timeout Request a thing Wait N units of time for thing Timeout if not received 25Timeout auto0 码力 | 106 页 | 26.36 MB | 6 月前3
ConcurrencyConcurrencyCppCon 2023 2 David Olsen - Back to Basics: Concurrency Alxndrul, CC BY-SA 4.0, via Wikimedia CommonsCppCon 2023 3 David Olsen - Back to Basics: Concurrency Alxndrul, CC BY-SA 4.0, via Wikimedia CommonsCppCon 4 David Olsen - Back to Basics: Concurrency Jetstar Airways (jetstar.com), CC BY-SA 2.0, via Wikimedia CommonsCppCon 2023 5 David Olsen - Back to Basics: Concurrency Kentaro Iemoto from Tokyo, Japan CppCon, October 5, 2023 BACK TO BASICS: CONCURRENCYCppCon 2023 7 David Olsen - Back to Basics: Concurrency STD::THREAD int main() { std::thread my_thread{[](int z){ std::cout << "Hello from thread:0 码力 | 160 页 | 2.91 MB | 6 月前3
Design PatternsKlaus Iglberger, CppCon 2024 klaus.iglberger@gmx.de Design Patterns The Most Common Misconceptions (2 of N)2 Klaus Iglberger C++ Trainer/Consultant Author of “C++ Software Design” (Co-)Organizer Email: klaus.iglberger@gmx.deThe 2nd in a Row 3The 2nd in a Row 45 Let’s again talk about design patterns and virtual functionsThe Overhead of Inheritance Hierarchies 6The Overhead of Inheritance Hierarchies std::variant are replacements for virtual functions 🥸131 Design patterns represent dependency structures 🥸132 Thus design patterns have architectural properties 🥸133 You cannot just replace one0 码力 | 136 页 | 7.95 MB | 6 月前3
DEDUCING this PATTERNSDEDUCING this PATTERNS BEN DEANE / CPPCON 2021 @ben_deaneOVERVIEW This presentation is about P0847, "Deducing this" ( ) Gašper Ažman, Sy Brand, Ben Deane, Barry Revzin – "We propose a new mechanism link/p0847OVERVIEW A bit about the motivation and history of P0847 What the feature is Existing patterns evolved by P0847 New patterns not possible before P0847 Miscellanea Disclaimer: all code is exposition only and regular to call func! } };CONSIDER "TEMPLATE METHOD" Recall the template method pattern (Design Patterns, Gamma/Helm/Johnson/Vlissides pp 325-330) struct Base { auto TemplateMethod() { PrimitiveOperation1();0 码力 | 126 页 | 5.15 MB | 6 月前3
Concurrency in RustConcurrency in Rust Alex Crichton What’s Rust? Rust is a systems programming language that runs blazingly fast, prevents segfaults, and guarantees thread safety. Concurrency? Libraries Futures Futures Rust? What’s concurrency? In computer science, concurrency is a property of systems in which several computations are executing simultaneously, and potentially interacting with each other. Why concurrency? Getting our feet wet // What does this print? int main() { int pid = fork(); printf("%d\n", pid); } Concurrency is hard! • Data Races • Race Conditions • Deadlocks •0 码力 | 43 页 | 648.31 KB | 1 年前3
Back to Basics: ConcurrencyBack to Basics: Concurrency I also do C++ training! arthur.j.odwyer@gmail.com Arthur O’Dwyer 2020-09-18Outline ● What is a data race and how do we fix it? [3–12] ● C++11 mutex and RAII lock types [46–52] ● Bonus C++20 slides [53–58] Questions? 2What is concurrency? ● Concurrency means doing two things concurrently — “running together.” Maybe you’re switching back music ● In extremely broad strokes, parallelism is a hardware problem (think multiple CPUs) and concurrency is a software problem (think time-sharing, but also Intel’s “hyperthreading”). 3Why does C++0 码力 | 58 页 | 333.56 KB | 6 月前3
Back to Basics: Concurrency1Please do not redistribute slides without prior permission. 2Back to Basics: Concurrency Mike Shah, Ph.D. @MichaelShah | mshah.io | www.youtube.com/c/MikeShah 4:45 pm MDT, Mon. October 25 60 minutes the free lunch being over for programmers? In this talk we provide a gentle introduction to concurrency with the modern C++ std::thread library. We will introduce topics with pragmatic code examples and showing how these programming primitives enable concurrency. In addition, we will show the common pitfalls to be aware of with concurrency: data races, starvation, and deadlock (the most extreme0 码力 | 141 页 | 6.02 MB | 6 月前3
Back to Basics: Design PatternsPlease do not redistribute slides without prior permission. 1Back to Basics: Design Patterns Mike Shah, Ph.D. @MichaelShah | mshah.io September 17, 2020 60 minutes | Introductory to Intermediate discussion!Abstract Design Patterns are reusable elements of design that may help aid in making software more maintainable, flexible, and extensible. The term 'design patterns' can be traced back to at Design Patterns, in which common software design patterns were defined and categorized. In this talk, you will learn the fundamentals of the creational, structural, and behavior design patterns. This0 码力 | 96 页 | 2.10 MB | 6 月前3
共 1000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 100













