TScEventCallMode = (ecAsynchronous, ecSynchronous, ecDirectly);



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.  


ecAsynchronousSpecifies 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.
ecSynchronousSpecifies 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.
ecDirectlySpecifies 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





SecureBridge Components, Copyright © 2007-2021 Devart. All Rights Reserved. Provide Feedback Visit Forum Request Support