In this video, I demonstrate a technique for communicating between threads in a Delphi application, without using typical locking mechanisms such as critical sections. Best Viewed in Full Screen (Recorded 1080p).

Download the source

Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder. Design. Code. Compile. Deploy.

Start Free Trial   Free Delphi Community Edition   Free C++Builder Community Edition   Upgrade Today  

No Data
  • It's true that the UI thread does both a push and a pull, but those operations are on two different arrays. The second thread is simply copying messages from the first array to the second. While I agree this is a very simple example, it demonstrates a two way communication between the UI thread and the other thread (consider it an echo thread). Perhaps this is the cause of confusion. The second thread need not simply echo the messages from one array to another, but instead could act on messages to do something useful. Echo was just the simplest example I could use.
No Data