LibCoder

Learn Concurrent Programming with Go

1C Agda Go
Learn Concurrent Programming with Go
Автор: Cutajar James
Дата выхода: 2024
Издательство: Manning Publications Co.
Количество страниц: 329
Размер файла: 11,6 МБ
Тип файла: PDF
Добавил: LibCoder
Оглавление
Preface  Acknowledgments  About this book  Who should read this book  How this book is organized: A road map  How to read the book  About the code  liveBook discussion forum  About the author  About the cover illustration  Part 1: Foundations  Chapter 1: Stepping into concurrent programming  1.1 About concurrency  1.2 Interacting with a concurrent world  1.3 Increasing throughput  1.4 Improving responsiveness  1.5 Programming concurrency in Go  1.5.1 Goroutines at a glance  1.5.2 Modeling concurrency with CSP and primitives  1.5.3 Building our own concurrency tools  1.6 Scaling performance  1.6.1 Amdahl’s law  1.6.2 Gustafson’s law  Chapter 2: Dealing with threads  2.1 Multiprocessing in operating systems  2.2 Abstracting concurrency with processes and threads  2.2.1 Concurrency with processes  2.2.2 Creating processes  2.2.3 Using multiprocessing for common tasks  2.2.4 Concurrency with threads  2.2.5 A multithreaded application in practice  2.2.6 Using multiple processes and threads together  2.3 What’s so special about goroutines?  2.3.1 Creating goroutines  2.3.2 Implementing goroutines in the user space  2.3.3 Scheduling goroutines  2.4 Concurrency versus parallelism  2.5 Exercises  Chapter 3: Thread communication using memory sharing  3.1 Sharing memory  3.2 Memory sharing in practice  3.2.1 Sharing a variable between goroutines  3.2.2 Escape analysis  3.2.3 Updating shared variables from multiple goroutines  3.3 Race conditions  3.3.1 Stingy and Spendy: Creating a race condition  3.3.2 Yielding execution does not help  3.3.3 Proper synchronization  3.3.4 The Go race detector  3.4 Exercises  Chapter 4: Synchronization with mutexes  4.1 Protecting critical sections  4.1.1 Using mutexes  4.1.2 Mutexes and sequential processing  4.1.3 Non-blocking mutex locks  4.2 Readers–writer mutexes  4.2.1 Go’s readers–writer mutex  4.2.2 Read-preferred readers–writer mutex  4.3 Exercises  Chapter 5: Condition variables and semaphores  5.1 Condition variables  5.1.1 Mutexes with condition variables  5.1.2 Missing the signal  5.1.3 Waits and broadcasts  5.1.4 Readers–writer locks  5.2 Counting semaphores  5.2.1 What’s a semaphore?  5.2.2 Building a semaphore  5.2.3 Never miss a signal  5.3 Exercises  Chapter 6: Waitgroups and barriers  6.1 Waitgroups in Go  6.1.1 Waiting for tasks  6.1.2 Semaphores for waitgroups  6.1.3 Changing size of waitgroup  6.1.4 Flexible waitgroup  6.2 Barriers  6.2.1 What is a barrier?  6.2.2 Barrier in Go  6.2.3 Matrix multiplication with barriers  6.3 Exercises  Part 2: Message passing  Chapter 7: Communication using message passing  7.1 Passing messages  7.1.1 Channels  7.1.2 Buffered channels  7.1.3 Directional channels  7.1.4 Closing channels  7.1.5 Receiving resu

Описание

Коротко и по делу о том, что важно знать про concurrency.

Start writing concurrent code that improves performance, scales up to handle large volumes of data, and takes full advantage of modern multi-processor hardware. Concurrency doesn’t need to be confusing. Too many developers think concurrency is extremely challenging. This book uses the easy-to-grasp concurrency tools of the Go language to demonstrate principles and techniques, steadily teaching you the best practices of effective concurrency. Learn Concurrent Programming with Go is here to prove them wrong! Techniques learned in this book can be applied to other languages.

In Learn Concurrent Programming with Go you will learn how to:Implement effective concurrency for more responsive, higher performing, scalable software

Avoid common concurrency problems such as deadlocks and race conditions

Manage concurrency using goroutines, mutexes, readers-writer locks, and more

Identify concurrency patterns such as pipelining, worker pools, and message passing

Discover advantages, limits, and properties of parallel computing

Improve your Go coding skills with advanced multithreading topics

In Learn Concurrent Programming with Go, you’ll discover universal principles of concurrency, along with how to use them for a performance boost in your Go applications. Concurrent programming allows multiple tasks to execute and interact simultaneously, speeding up performance and reducing user wait time. Expert author James Cutajar starts with the basics of modeling concurrency in your programs, demonstrates differences between message passing and memory sharing, and even introduces advanced topics such as atomic variables and futexes.

This book will show you how! About the technologyYou can improve almost any application’s performance and responsiveness by introducing concurrency into the codebase. It starts with the basics of concurrent programming and builds your skills step by step by exploring scenarios you’ll face every day as a developer. Author James Cutajar explains each aspect of concurrency in plain language using the intuitive features baked into the Go language.

In it, you’ll learn how to divide larger programming tasks into independent parts that can run simultaneously. About the bookLearn Concurrent Programming with Go provides a practical, hands-on introduction to creating software for modern multiprocessor systems. You’ll use the Go language to implement common concurrency patterns by utilizing readers-writer locks, semaphores, message passing, and memory sharing. The skills you learn will easily transfer to other languages.

What's insidePrevent deadlocks and race conditions

Go concurrency features like goroutines, mutexes, channels, and more

Concurrency patterns including pipelining and worker pools

About the readerFor programmers with basic knowledge of Go or another C-style language. No experience in concurrent programming required.

На этом основные моменты по теме закрыты.

concurrency programming concurrent learn language performance your this

Частые вопросы

Можно ли скачать «Learn Concurrent Programming with Go» бесплатно?

Да, «Learn Concurrent Programming with Go» доступна для бесплатного скачивания на нашем сайте в формате PDF. Ссылка на файл находится на этой странице.

В каком формате и какого размера файл?

Книга предоставляется в формате PDF, размер файла 11,6 МБ.

Кто автор и когда вышла книга?

автор — Cutajar James, издательство Manning Publications Co., год выпуска 2024, 329 страниц.

О чём книга «Learn Concurrent Programming with Go»?

Concurrency doesn’t need to be confusing.

Похожие материалы