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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DemandInitialize() is not threadproof

Thread ID:

Created:

Updated:

Platform:

Replies:

8912 Nov 26,2003 11:10 AM UTC Dec 8,2003 01:00 PM UTC WinForms 2
loading
Tags: GridControl
Markus Kraft
Asked On November 26, 2003 11:10 AM UTC

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

Administrator [Syncfusion]
Replied On November 28, 2003 09:31 PM UTC

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.

Gene Gorokhovsky
Replied On December 8, 2003 01:00 PM UTC

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 > >

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;