Параллельное программирование с OmniThreadLibrary
Параллельное программирование с OmniThreadLibrary
О книге
Эта книга о параллельном программировании с OmniThreadLibrary (otl.17slon.com), могопоточной библиотеке для Delphi. Вы можете получить дополнительную информацию о книге и текущем состоянии каждой главы в thedelphigeek.com.
Table of Contents
- Благодарности
- Перевод
- Введение
- Соглашения форматирования
- В разработке
- Объявление
- Примечания к выпуску
- 1 Введение в многопоточность
- 1.1 Бесплатной еды больше не будет (The Free Lunch is Over)
- 2 Введение в OmniThreadLibrary
- 2.1 Требования
- 2.2 Лицензия
- 2.3 Установка
- 2.3.1 Установка пакета времени разработки
- 2.4 Зачем использовать OmniThreadLibrary?
- 2.5 Задачи или потоки
- 2.6 Блокирование или соообщения
- 2.7 TOmniValue
- 2.8 Свободные интерфейсы
- 3 Высокоуровневая многопоточность
- 3.1 Введение
- 3.1.1 Жизненный цикл Абстракции
- 3.1.2 Анонимные методы, Методы и Процедуры
- 3.1.3 Пулинг
- 3.2 Блокирующая коллекция
- 3.2.1 IOmniBlockingCollection
- 3.2.2 Регулирование
- 3.3 Конфигурация задач
- 3.4 Асинхронность (Async)
- 3.4.1 Обработка исключений
- 3.5 Async/Await
- 3.6 Будущее (Future)
- 3.6.1 Интерфейс IOmniFuture
- 3.6.2 Определение завершения
- 3.6.3 Отмена
- 3.6.4 Обработка исключений
- 3.6.5 Примеры
- 3.7 Присоединение (Join)
- 3.7.1 Интерфейс IOmniParallelJoin
- 3.7.2 Интерфейс IOmniJoinState
- 3.7.3 Отмена
- 3.7.4 Обработка исключений
- 3.8 Параллельная задача (Parallel Task)
- 3.8.1 Интерфейс IOmniParallelTask
- 3.8.2 Пример
- 3.8.3 Обработка исключений
- 3.8.4 Примеры
- 3.9 Фоновый рабочий (Background Worker)
- 3.9.1 Основы
- 3.9.2 Интерфейс IOmniBackgroundWorker
- 3.9.3 Инициализация задачи
- 3.9.4 Конфигурация рабочих элементов
- 3.9.5 Интерфейс рабочего элемента
- 3.9.6 Примеры
- 3.10 Конвейер (Pipeline)
- 3.10.1 Понятия
- 3.10.2 Основы
- 3.10.3 IOmniPipeline
- 3.10.4 Генераторы, Преобразователи и Агрегаторы
- 3.10.5 Регулирование
- 3.10.6 Параллельные этапы
- 3.10.7 Исключения
- 3.10.8 Примеры
- 3.11 Для каждого (For Each)
- 3.11.1 Сотрудничество
- 3.11.2 Перебираем …
- 3.11.2.1 … Числовые диапазоны
- 3.11.2.2 … Перечисляемые коллекции
- 3.11.2.3 … Потокобезопасные перечисляемые коллекции
- 3.11.2.4 … Блокирующие коллекции
- 3.11.2.5 … Всё
- 3.11.3 Обеспечение внешнего ввода
- 3.11.4 IOmniParallelLoop
- 3.11.5 Сохранение выходного порядка
- 3.11.6 Агрегация
- 3.11.7 Отмена
- 3.11.8 Инициализация и завершение задачи
- 3.11.9 Обработка исключений
- 3.11.10 Внутреннее устройство
- 3.11.10.1 Поставщик источника
- 3.11.10.2 Менеджер данных
- 3.11.10.3 Локальная очередь
- 3.11.10.4 Упорядочивание вывода
- 3.11.11 Примеры
- 3.12 Разделение/Присоединение (Fork/Join)
- 3.12.1 IOmniForkJoin
- 3.12.2 IOmniCompute
- 3.12.3 IOmniCompute<T>
- 3.12.4 Исключения
- 3.12.5 Примеры
- 4 Низкоуровневая многопоточность
- 4.1 Пул потоков
- 4.2 Неблокируемые коллекции
- 4.2.1 Ограниченный стек
- 4.2.2 Ограниченная очередь
- 4.2.3 Динамическая очередь
- 4.3 Простые задачи
- 4.3.1 Связь
- 4.3.2 Вызов
- 4.3.3 Исключения
- 4.3.4 MonitorWith
- 4.3.5 Отменяющий токен / CancelWith
- 4.3.6 Блокировка / WithLock
- 4.3.7 Счётчик / WithCounter
- 4.3.8 Группа задач
- 5 Синхронизация
- 5.1 Критические секции
- 5.1.1 IOmniCriticalSection
- 5.1.2 TOmniCS
- 5.1.3 Locked
- 5.1.3.1 Почему бы не использовать TMonitor?
- 5.2 TOmniMREW
- 5.3 Отменяющий токен
- 5.4 Ожидающее значение
- 5.5 Обратный семафор
- 5.6 Инициализация
- 5.6.1 Пессимистичная инициализация
- 5.6.2 Оптимистичная инициализация
- 6 Разное
- 6.1 TOmniValue
- 6.2 TOmniCounter
- 6.3 TGp4AlignedInt è TGp8AlignedInt64
- 7 Как сделать… (How to…)
- 7.1 Фоновое сканирование файлов
- 7.2 Async/Await
- 7.3 Загрузка из интернета и хранилище базы данных
- 7.4 Параллельный For с синхронизированным выводом
- 7.5 Фоновый рабочий и разделение списка
- 7.6 Параллельное производство данных
- 7.7 Создание пула соединений
- 7.7.1 От теории к практике
- 7.7.2 Запуск демо
- 7.8 Быстрая сортировка и параллельный максимум
- 7.8.1 Быстрая сортировка
- 7.8.1.1 Параллельный максимум
- 7.9 Параллельный поиск в дереве
- 7.10 Несколько рабочих с несколькими структурами
- 7.10.1 Рабочий
- 7.10.2 Фрейм
- 7.10.3 Форма
- 7.11 OmniThreadLibrary и базы данных
- 7.11.1 Модель базы данных
- 7.11.2 Фрейм и рабочий
- 7.11.2.1 Подключение к базе данных
- 7.11.2.2 Получение данных
- 7.11.3 Главная программа
- 7.12 OmniThreadLibrary и COM/OLE
- 8 Словарь
- 9 Демонстрационные приложения
Authors have earned$10,089,287writing, publishing and selling on Leanpub, earning 80% royalties while saving up to 25 million pounds of CO2 and up to 46,000 trees.
Узнать подробнее о написании на Leanpub
Безусловная 100% гарантия счастья без риска от Leanpub
В течение 45 дней с момента покупки вы можете получить 100% возврат средств на любую покупку в Leanpub всего в два клика. Мы обрабатываем заявки на возврат средств вручную, так что этот процесс может занять несколько дней. Смотрите полные условия.
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers), EPUB (for phones and tablets) and MOBI (for Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
Top Books
C++20
Rainer GrimmC++20 is the next big C++ standard after C++11. As C++11 did it, C++20 changes the way we program modern C++. This change is, in particular, due to the big four of C++20: ranges, coroutines, concepts, and modules.
The book is almost daily updated. These incremental updates ease my interaction with the proofreaders.
A Guide to Artificial Intelligence in Healthcare
Dr. Bertalan MeskoCan we stay human in the age of A.I.? To go even further, can we grow in humanity, can we shape a more humane, more equitable and sustainable healthcare? This e-book aims to prepare healthcare and medical professionals for the era of human-machine collaboration. Read our guide to understanding, anticipating and controlling artificial intelligence.
C++ Best Practices
Jason TurnerLevel up your C++, get the tools working for you, eliminate common problems, and move on to more exciting things!
Atomic Kotlin
Bruce Eckel and Svetlana IsakovaFor both beginning and experienced programmers! From the author of the multi-award-winning Thinking in C++ and Thinking in Java together with a member of the Kotlin language team comes a book that breaks the concepts into small, easy-to-digest "atoms," along with exercises supported by hints and solutions directly inside IntelliJ IDEA!
Sockets and Pipes
Type ClassesSockets and Pipes is not an introduction to Haskell; it is an introduction to writing software in Haskell. Using a handful of everyday Haskell libraries, this book walks through reading the HTTP specification and implementing it to create a web server.
Introducing EventStorming
Alberto BrandoliniThe deepest tutorial and explanation about EventStorming, straight from the inventor.
node-opcua by example
Etienne RossignonGet the best out of node-opcua through a set of documented examples by the author himself that will allow you to create stunning OPCUA Servers or Clients.
Ansible for DevOps
Jeff GeerlingAnsible is a simple, but powerful, server and configuration management tool. Learn to use Ansible effectively, whether you manage one server—or thousands.
Functional Design and Architecture
Alexander GraninSoftware Design in Functional Programming, Design Patterns and Practices, Methodologies and Application Architectures. How to build real software in Haskell with less efforts and low risks. The first complete source of knowledge.
Composing Software
Eric ElliottAll software design is composition: the act of breaking complex problems down into smaller problems and composing those solutions. Most developers have a limited understanding of compositional techniques. It's time for that to change.
Top Bundles
- #1
Software Architecture for Developers: Volumes 1 & 2 - Technical leadership and communication
2 Books
"Software Architecture for Developers" is a practical and pragmatic guide to modern, lightweight software architecture, specifically aimed at developers. You'll learn:The essence of software architecture.Why the software architecture role should include coding, coaching and collaboration.The things that you really need to think about before... - #2
All the Books of The Medical Futurist
6 Books
We put together the most popular books from The Medical Futurist to provide a clear picture about the major trends shaping the future of medicine and healthcare. Digital health technologies, artificial intelligence, the future of 20 medical specialties, big pharma, data privacy, digital health investments and how technology giants such as Amazon... - #3
PowerShell
3 Books
Buy every PowerShell book from Adam Bertram at a 20% discount! - #4
Cisco CCNA 200-301 Complet
4 Books
Ce lot comprend les quatre volumes du guide préparation à l'examen de certification Cisco CCNA 200-301. - #5
Linux Administration Complet
4 Books
Ce lot comprend les quatre volumes du Guide Linux Administration :Linux Administration, Volume 1, Administration fondamentale : Guide pratique de préparation aux examens de certification LPIC 1, Linux Essentials, RHCSA et LFCS. Administration fondamentale. Introduction à Linux. Le Shell. Traitement du texte. Arborescence de fichiers. Sécurité... - #6
Modern C++ by Nicolai Josuttis
2 Books
- #7
Django for Beginners/APIs/Professionals
3 Books
- #8
Learn Git, Bash, and Terraform the Hard Way
3 Books
Learn Git, Bash and Terraform using the Hard Way method.These technologies are essential tools in the DevOps armoury. These books walk you through their features and subtleties in a simple, gradual way that reinforces learning rather than baffling you with theory. - #9
Software Architecture and Beautiful APIs
2 Books
There is no better way to learn how to design good APIs than to look at many existing examples, complementing the Software Architecture theory on API design. - #10
Digital Future of Healthcare and Pharma
3 Books
These three popular e-books from The Medical Futurist describes how digital health technologies will shape the future of health, healthcare, medicine and pharma with exciting infographics in a digestible format.