We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

DemandInitialize() is not threadproof

Hi, the DemandInitialize() in GridControlBase.cs dont works correct on hyperthreading machine. This version of DemandInitialize()is not threadproof. Please see the file notThreadProof.txt in attachement. My suggestion to resolve the problem and make the method threadproof you can find in threadProof.txt in attachement. Can you please test your product on a hyperthreading machine? greetings markus

2 Replies

AD Administrator Syncfusion Team November 28, 2003 04:31 PM

Making these changes will not make the grid thread safe. There will be other methods that will fail. In general, you need to use grid.InvokeRequired checks to make sure you are interacting with the grid on the thread that created it. Here is a little sample that uses InvokeRequired checks to force interactions with the grid to be on the thread that created it.


GG Gene Gorokhovsky December 8, 2003 08:00 AM

To make calls go automatically through Invoke when it is required, you can create a transparent proxy, which for all callers will appear to be Grid, but internally will do some magic before forwarding Grid calls. This technique can also be adapted for situations where a lock should be applyied around every call. Here is an example of how it could be implemented: http://www.vzavenue.net/~danieljohnson/netproxies/index.html > Hi, > the DemandInitialize() in GridControlBase.cs > dont works correct on hyperthreading machine. > > This version of DemandInitialize()is not threadproof. > Please see the file notThreadProof.txt in attachement. > > My suggestion to resolve the problem and make the method threadproof you can find in threadProof.txt in attachement. > > Can you please test your product on a hyperthreading machine? > > greetings markus > >

Loader.
Live Chat Icon For mobile
Up arrow icon