Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works
Anything · Lazarus or Delphi
Random projectRandom project

TestThreading

Example of how to use TThread and all of the threading tools available with Free Pascal

View on GitHub

Member rating

No ratings yet.

Sign in to rate this project.

README

Test Threading

Example of how to use the Class TThread and all of the threading tools available with Free Pascal.

Single Thread, Single Instance

This exemplifies the most basic use of a thread.

It declares an event to hook into the main form.

This is a single shot use because we set the thread's FreeOnTerminate property to True.

Single Thread, Many Instances

The example above isn't of much use if we just run a single instance.

In this example we create multiple instances of the same thread and we start them concurrently.

This is, also, a single shot use because we set the thread's FreeOnTerminate property to True.