ParamSync 1.2

By Mauro Venturini

Freeware 24 Feb 2003

In category

Components > System > Threads

Description

The TThread.Synchronize causes a method to be executed using the main thread, thereby avoiding multi-thread conflicts (expecially on the VCL). Unfortunately it only supports parameterless methods. This unit provides techniques to extend this to methods with parameters.
  • Any method of a thread derived from TParamThread can be synchronized to the main thread using ParamSynchronize.
  • Any method executed inside any thread can be synchronized to the main thread using the Execute method of TParamSynchronize. It can be accessed directly (it is a class method) or creating a TParamSynchronize object (a singleton).
  • With some limitation about parameter types a thread derived from TParamThread can launch one of its method using ParamAsynchronize and go on without waiting for its completion.
  • With some limitation about parameter types a any thread can launch any method using the Execute method of TParamAsynchronize and go on without waiting for its completion.
In the last two cases the method execution is delegated to a server thread and the execution can be synchronized or not to the main thread.

Informations

  • Status: Fully functional
  • Source: FW
  • Size: 9 016kB

Platforms:

  • Delphi 7

Downloads