Using the Parallel Programming Library
Go Up toUsing the RTL in Multi-Device Applications
TheRTL provides theParallel Programming Library (PPL), giving your applications the ability to have tasks running in parallel taking advantage of working across multiple CPU devices and computers. ThePPL includes a number of advanced features for running tasks, joining tasks, waiting on groups of tasks, etc. to process. For all this, there is athread pool that self tunes itself automatically (based on the load on the CPU’s) so you do not have to care about creating or managing threads for this purpose.
You can use this library by includingSystem.Threading in your apps. This unit is made up of several features that can be included into new and existing projects. The unit also includes a number of overloaded arguments to make it suitable for C++ as well as Delphi.
Using thePPL, your applications can easily:
- Make looping faster withTParallel.For.
- Run multiple tasks in parallel usingTTask andITask.
- Leave a process running focusing on other tasks and then get the result of that process at the point you want.IFuture allows you to establish a priority for the running code blocks and still return the results when needed.
Platform Support
ThePPL works on Windows, MacOSX, Android, and iOS devices.
Topics
- Using TTask from the Parallel Programming Library
- Using TParallel.For from the Parallel Programming Library
- Using TTask.IFuture from the Parallel Programming Library