Threads 7.1
Welcome to multithreaded heaven! Is Threads running now? Check here. Sample Application

Delphi ... the higher, the better!

All Windows platforms


Register Now
Buy Now

Threads: Multithreaded Application Model.

I downloaded many multithreaded applications from various sites. None of them was reliable as I wished. I read lots of stuff about race conditions, deadlocks, how can threads corrupt data or starve. I didn't find an entire application (source code) which will implement good protection and threads synchronization, database access, etc. This is a project that started back in the year 2000.

This is what I tried to accomplish in this application: a model which can be used to start many other multithreaded apps. If you need badly to see some multithreaded code, Threads is for you. If you are in a hurry to deliver a multithread application, here you go; get Threads and I believe in shortest time you will come up with your problem solved. How can you use this stuff? In two ways: learning and/or adding your own code to it. What the sources will give you:

  • threaded database access, using FireDAC, DBISAM*, ElevateDB*  - (can work in 2 modes: pooling and on request);
  • threaded Indy sending/receiving email, ftp downloading or uploading;
  • threaded Indy pings (you can setup a list of web servers);
  • threaded dynamic reports using ReportBuilder* or FastReport *;
  • a lot (and I mean a lot) of thread management: threads waiting for other threads to process things, threads sharing resources, threads running standalone forcing other threads to quit or blocking other threads from running; multiprocessor thread distribution;
  • threaded folder changes monitor;
  • threaded PDF* file conversion. Currently, Threads can convert Word, Excel and Postscript files to PDF. It uses Ghostscript for that matter; conversion requests can arrive via file copy, email monitoring, or directly through database records. Customers have a table and conversion can happen based on some plan. This feature is implemented currently with ElevateDB database;
  • threaded WMI events monitoring (in-the-box Win32__PingStatus, or, you can setup anything else at run-time from whatever namespace);
  • threaded WMI pings;
  • IOCP worker threads;
  • threaded launching secondary apps or batches and monitor them closely, terminate them on a timer, etc;
  • core internal wrapper classes that can do the email stuff;
  • core internal sources for processing strings (yeah, we do have SysUtils, StrUtils, but there is still stuff that you canít find there);
  • core internal sources for directly using WinInet library;
  • core internal sources for using WBEM (WMI stuff made easy);
  • core stuff to monitor application threads, memory, cpu usage, handles and other things;
  • message processing in secondary thread;
  • stuff that I probably forgot about...


* This feature is available in the 32 bits executable edition. If you register the code and if you have the latest DBISAM, ElevateDB and ReportBuilder, FastReport upgrades which can work on 64-bits Windows than Threads can be fully compiled under 64 bit with all features enabled.

Click here to view image (gif  256KB), or check the version history here (jpg 140KB).

Or even better: take a look at my other applications, based entirely on my own threading engine. Take a look at EZ News Reader (jpg 138KB - however, since I'm not in the business of writing a news reader, this project is dead. There are too many newsreaders out there already).  Or the Printer Usage Monitor application.

Mike Lischke's VirtualTrees are heavily used in this application. Mike's old web site is here.
Have fun !

Built projects:

The application: setup (4 MB) 2015.12.27. The demo is 32 bits and compiled with Delphi 10 Seattle.

If you like Threads, register it to get full source code and then adapt it even more to suit your needs.

( p.s. I like Martin Harvey's thread tutorial. )

Version 7 is available for download! This new edition compiles in both 32/64 bits flavors. Threads 7 will only be supported for Delphi XE2 or higher. Stuff that won't compile lower (reference procs/funcs) can be downgraded, I suppose pretty easy, but I am too busy to keep up with that.

Tested under Windows 10. Existing users: this won't be a free upgrade unless you bought Threads starting with year 2012. Upgrade by request only (as usual).