mauede
Well-known member
Some months ago I learned that the Varian library ESAPI is mono-threaded.
Consequently, If we try to instantiate a class, that is on another thread, from the GUI, we get an exception because classes, on a stack, cannot transfer thread ownership.
We can pass values over a multi-threaded environment but we cannot pass a class through different threads.
Recently I got bogged down with using Velocity API, another Varian library while attempting to build a WPF User Interface.
I do not know whether Velocity API is mono-threaded. I can only state that I successfully instantiated its classes and called its methods in a sequential Console-UI application.
Now I am trying to implement a WPF GUI offering the same functionalities offered by the Console UI application.
I use the same classes and methods I used in the Console UI application. But now I get Memory-Access-Violation thrown
on statements that call a Velocity API method. This phenomenon is not systematic, it does not occur always on the same statement, but it originates from a call of a Velocity API method.
I would like to know whether the erratic Memory-Acces Violations are symptomatic of dealing with a mono-threaded library from a different thread.
If this is the case, is there any workaround to avoid the exceptions?
Thank you in advance
Consequently, If we try to instantiate a class, that is on another thread, from the GUI, we get an exception because classes, on a stack, cannot transfer thread ownership.
We can pass values over a multi-threaded environment but we cannot pass a class through different threads.
Recently I got bogged down with using Velocity API, another Varian library while attempting to build a WPF User Interface.
I do not know whether Velocity API is mono-threaded. I can only state that I successfully instantiated its classes and called its methods in a sequential Console-UI application.
Now I am trying to implement a WPF GUI offering the same functionalities offered by the Console UI application.
I use the same classes and methods I used in the Console UI application. But now I get Memory-Access-Violation thrown
on statements that call a Velocity API method. This phenomenon is not systematic, it does not occur always on the same statement, but it originates from a call of a Velocity API method.
I would like to know whether the erratic Memory-Acces Violations are symptomatic of dealing with a mono-threaded library from a different thread.
If this is the case, is there any workaround to avoid the exceptions?
Thank you in advance