DALIJA PRASNIKAR

Delphi Event-based and Asynchronous Programming - The Book / Contact

Delphi Event-based and Asynchronous Programming

Please select your option

Delphi Event-based and Asynchronous Programming

291 pages PDF, ePub, mobi

Event-based programming is everywhere. Nowadays, you can hardly write any kind of application without leaning on events and messages.

This simple, yet extremely powerful mechanism is also the cornerstone of asynchronous and multithreaded programming. Without events, we would not know when some task was completed.

But, asynchronous and multithreaded programming consists of more than just handling multiple threads, protecting shared resources, and synchronization. It also includes designing and understanding program flow. That design aspect is often forgotten, taken for granted, and solving all the fine-grained nuances of multithreaded programming hogs the spotlight.

Without understanding asynchronous flow and the bigger picture it can be hard to properly solve all the other issues, including multithreading. What used to be plain spaghetti code, now becomes temporal spaghetti.

You can lose control over your objects, have bits of code creating and releasing them all over the place, even without adding multithreading into the mix. Memory leaks, crashes, and holding references to dead data long after its destruction are perfectly possible even in a singlethreaded environment.

While the starting point of this book is giving a proper introduction to event-based and asynchronous programming flow and design, it also provides the necessary implementation details, explanations and code examples needed to put those designs into practice.


 

Table of Contents

Introduction

1. The Loop

  • Hidden complexity
  • Peeking at the console
  • Main event loop
  • Event-based programming
  • Pushmi-pullyu
  • Game loop

2. Messaging Systems

  • Windows messaging system
  • Windows messaging system in VCL
  • Custom messaging systems and patterns
  • System.Messaging

3. Life, the Universe, and Everything

  • Life, the Universe, and Everything
  • Automatic memory management
  • Interfaces
  • Class helpers
  • Anonymous methods and lambdas

4. Asynchronous Programming and Multithreading

  • Asynchronous programming and multithreading
  • Making the first dive...
  • Application.ProcessMessages
  • Application.ProcessMessages reentrancy problem
  • Moving long operations to a background thread
  • Asynchronous message dialog
  • Tasks
  • Futures

5. Thread Safety

  • What is thread safety anyway?
  • The importance of thread safety
  • Achieving thread safety
  • Avoiding shared data
  • Protecting shared data

6. GUI and Multithreading

  • Main (GUI) thread
  • Communicating with the main thread
  • Communication and GUI issues

 

Important Note:
 
If you purchased Part I of the book before December 27, you can download the Full version now, through the same PDF/epub/mobi links that you have received earlier from FastSpring via email.
 
The subject line of that email message was: "Your Delphi Event-based and Asynchronous Programming - Part I Delivery Information"
 


 

If you have already purchased the eBook version, and wish to buy the paperback, you're eligible for a 50% discount! Contact us to get a discount code and a link.


 

Copyright © Prasnikar.info / Terms / Privacy / Contact