dapug.gif (2886 bytes)retur.gif (1166 bytes)


WORKSHOP 13. - 14. september 2011

Hotel Hesselet

 DAPUG Multithreading Workshop

Cary Jensen

  • This in-depth DAPUG workshop has two major components, review and application. In the review sections we will covers all of the basics of multi-threaded development in Delphi. In the application sections you are encouraged to use what you have learned to begin building your own multithreaded solutions. In this part you may work alone or in teams.


  • DAPUG Multithreading Workshop at a Glance

  • Overview of threads
    When and why to use additional threads
    When not to use additional threads

  • The Care and Feeding of Threads
    Creating a suspended or running thread
    Controlling a thread's priority
    The code that executes in a thread and that which does not
    Terminating a thread
    Debugging threads

  • Thread Synchronization
    ThreadVar, instance data, and local data
    The Synchronize method

  • The Threadly Deadly Sins
    Thread starvation
    Race conditions
    Thread priority inversion

  • What's New in Delphi's MultiThreading Support
    Anonymous threads

  • The DAPUG Multithreading Workshop Details

The DAPUG Multithreading Workshop begins with a general overview of multi-threaded development. This discussion includes when and why you should create additional threads of execution in your code, and when you should avoid doing so. It also covers those situations where you have no choice, those in which your code is executing in threads over which you have no control, such as when your code is executing in an ISAPI DLL or in response to an Internet Direct server.

Next, we discuss the fundamentals of creating and managing threads, with focus on Delphi's TThread class. Topics covered in this section include why and how to create a thread in a suspended state, how to control a thread's priority, and how to properly terminate a thread. Why the suspend and resume methods have been deprecated are also discussed. This section concludes with a look at Delphi's thread debugging features, including those debugging options introduced since Delphi 2009.

Here is where is gets really interesting. While threads are not so difficult to control, they introduce the potential for major problems. In short, when two threads have access the a common resource things can go very wrong. Fortunately, there is a handy solution called synchronization, and Delphi provides a wide variety of synchronization options. In this section you will learn the advantages and limitations of each of these traditional options.

It's now time to slow things down for a moment, and consider some of the classic thread-related bugs. These include thread starvation, race conditions, and thread priority inversion. How to spot these bugs will be discussed, and possible solutions will be presented.

Finally, it's time to look at Delphi's latest thread-related features. Since Delphi 2009, Delphi's support for multi-threaded development has grown significantly. Here we will look at the newest classes, records, and methods that you can use in your applications. Included in this discussion are TMonitor, TThreadedQueue, TSpinLock and TSpinWait, and anonymous threads. This section will necessarily include a discussion of generics and anonymous methods.



  • Prisen for WorkShop incl. overnatning på hotel og alle måltider er:
    kr. 4900,-
  • Ekstra overnatning fra 12. september koster kr. 1400,-
  • OBS: Hvis beløbet er indbetalt på regnr. 1551 konto. 4 76 67 76 inden 9. september
    krediteres kr. 200 på næste opkrævning af medlemskontingentet.

  • Tilmeld dig her. Sidste tilmeldingsdag er 15. august 2011
  • Der er begrænset antal pladser, så tilmeld dig straks!