Promotic
WikipediaLinkedInYoutubeTwitterFacebook

Sequencer - page of object PmSequencer

Description:
The page serves for basic parameters settings of the PmSequencer object.
Configuration items:
Maxim. number of itemsThe maximum number of items that can wait in the PmSequencer object at a time.

This configurator sets the initial value of the property MaxSize.

The value -1 represents unlimited number of items. The limitation is suitable to prevent designer's errors when the number of waiting items could increase over all limits.

Type of item startMeaning of timeout. The timeout is set in the Add method.
0 = items start independently, each according to its timeout - This means that the timeout is the time between adding the item (by the Add method) and its starting (by the onStep event).
1 = items start chronologically, timeout is delay between them - The so called timeout is the time between releasing the previous item and starting the following item.

If there is no waiting item in the object when calling the Add method and the last item has been started before a longer period than the timeout, then the new item will be started immediately.

Used threadDefinition of the thread where the script of the onStep event is started. The "New working thread" option means that this PmSequencer object creates new thread of the given priority at the start of the application. See also: How to start selected scripts in another thread.
Main = main thread of the application where other scripts are running by default
Normal = new working thread of the normal priority
BelowNormal = new working thread of the low priority
AboveNormal = new working thread of the high priority.
The stopping timeout before termination of the working thread [s]This is valid only for new working thread! The time limit (timeout), that defines the waiting period of the application for termination of the currently executed item, after which the forced termination of the working thread is execeuted (keep in mind that the forced termination may be dangerous). If there is no item currently being executed, or the item is terminated properly within the time limit, then the working thread is also terminated properly (if there are items waiting in the queue, then these are ignored). When the application is stopping, the working thread can be properly (safely) stopped only if no item is currently being executed. If there are items currently being executed, then it is necessary to wait until these are finished. In order to prevent waiting for too long (in case some item is being executed for unexpectedly long time), there is a time limit (timeout) that defines the time period the system would wait before the working thread is terminated by force.

Caution!Under normal circumstances, the designer should prevent the situations when the requests (of the working thread) are terminated by force. This is most easily secured by setting the timeout long enough to execute the longest possible request. The most time consuming requests can be shortened by creating a user defined global variable that holds the information about the application being stopped. Then test this variable while executing the request and if the application stopping is detected force the request termination even if the request is not fully completed. This is very handy for long iteration calculations or for processing individual items of a large data file.

Note:
Caution! If another thread is used then an access to other objects from the script proceeds in other than the main thread and it is necessary to take into account possible problems with the synchronization on reading and writing into Promotic objects. This option is suitable first of all for time consuming calculations on the background.
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice