|

Applications can be built to run on Windows 98, Windows ME, Windows NT4.0, Windows 2000 and Windows XP.
The threading components found in the Prof's Components Threading Suite were designed to eliminate the friction often experienced in writing multi-threaded applications, without compromising or limiting what can be done.
Component-based access to threading ensures that even those who are unfamiliar with the ins and outs of building multi-threaded applications can simply and quickly obtain "on the job" training through "drop and code" experiments.
You might expect that this ease-of-use aspect comes with compromise and reduced functionality. This is not so. In fact, the approach and architecture of the Prof's Components Threading Suite expressly make for a uniform model that gives the user easy access to sophisticated threading artefacts and usage. A particular example is the passing of arbitrary parameter lists from one thread to another. When a thread is executed, it can receive a list of parameters from the thread that executed it.
Similarly, an executing thread can pass parameters to the UI thread (ie the main VCL thread) when it wants the UI thread to update visible components to reflect progress or state. In addition, these notifications are done asynchronously, which means the thread does not have to wait, thus minimizing the impact on the performance of the thread itself.
Prof's Components uses a similar paradigm to Delphi's action lists and actions.
- Drop a TPCThreadedActionList onto your form and use its IDE editor to add a TPCThreadedAction.
- Write the code you want to run on a thread in the OnExecute event of the TPCThreadedAction.
- Write code to display the result of the execution in the OnAfterExecute event. This code runs on the main VCL thread.
- To start the thread, call the TPCThreadedAction's Execute method, passing any desired parameters.
The Sample Gallery illustrates this and more in the form of a tutorial.
To notify the user interface of progress from a thread, drop a TPCNotifier component onto the form, fill in its OnNotify event, and then periodically call the TPCNotifier's Notify method from within the TPCThreadedAction's OnExecute event, passing corresponding parameters.
If you're unfamiliar with threading issues, do not worry. Armed with a few simple rules and these components, you should encounter few difficulties.
So what about thread synchronization, thread pooling, thread affinity, resource pooling and all that? It's all there at your mouse-tip on the palette. And it couldn't be easier. From the IDE you can group threaded actions to share a pool of threads; control the concurrency of a threaded action (ie how many threads can be running its OnExecute event at the same time); use the synchronization objects to orchestrate and control the flow of execution of any group of threaded actions; ...
And that's not all. Even foreign threads (eg HTTP server threads) can use the notifier and synchronization components. This includes the main VCL thread without locking up its message loop!
And still more. Use TPCScheduledActions together with TPCScheduleSchemes to schedule when and how often a particular thread should executewith all the benefits and capabilities of TPCThreadedActions.
These threading components can also be created at runtime, and incorporated in other components.
- TPCThreadedActionList
- TPCThreadedAction
- TPCNotifier
- TPCGate
- TPCResourcePool
- TPCResource
- TPCEvent
- TPCMutex
- TPCSemaphore
- TPCWaitableTimer
- TPCScheduledActionList
- TPCScheduledAction
- TPCScheduleScheme
|