Unitc
ScUtils
type
TScEventCallMode = (ecAsynchronous, ecSynchronous, ecDirectly);
Description
The TScEventCallMode enumeration represents modes how the event handlers will be called that do not occur in the main application thread. This makes sense in cases when some SecureBridge clients run a new own thread for reading and processing data from the server.
Value | Meaning |
ecAsynchronous | Specifies that events are added to a queue and then the events are asynchronously synchronized from this queue with the main thread. This allows not slowing down the thread where events occur and at the same time calling the event handlers in the main thread. Note that the event handlers in this mode will not be called at the very moment when the event occurred, but possibly with some delay related to threads synchronization. |
ecSynchronous | Specifies that the event call will be synchronized with the main thread. In this case, if a delay occurs in the main thread, the thread generating the event will hang waiting for the event to be handled. |
ecDirectly | Specifies that there is no synchronization with the main thread. If you implement access to visual controls that are not thread-safe you need to implement your own synchronization methods in the event handler. |
See also