[DevExpress Support Team: CLONED FROM T419520: How to troubleshoot the "Reentrancy or cross thread operation detected" error]
Is there any plans for a thread-safe data layer that also supports dynamic metadata? Right now I use SimpleDataLayer
and set the deprecated SuppressReentrancyAndThreadSafetyCheck
property to true
. Whenever this property is finally taken down, I will have a huge problem on my hands.
Some context: I wrote classes and derived controls that makes it a breeze to create read-only, data bound list controls such as list boxes, grids and combo boxes with only little pieces of informations such as the name of a Sql Server view. They however rely heavily on a shared, long-living SimpleDataLayer
instance upon which metadata is added on-the-go, like when a user navigates to a form that requires the information in a particular view to be obtained.
There's a lot of potential for reusing metadata. Stuff like list of products or customers comes around a lot from one UI to another. For this particular reason, I came to find out it's more efficient to work with just one datalayer and multiple sessions using that same datalayer.
I wished I could use ThreadSafeDataLayer
, but the requirement that every single view used in every single data control in the whole application (hundreds of different UIs) is too steep. I need to keep it dynamic and keep the ability to query the data from a background thread if need be - of course while taking measures and full responsibility to prevent the UI thread from reacting to changes coming from a different thread.
I'd like a workaround that won't require me to review and rewrite code in hundreds of forms.