Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / CLR / January 2007

Tip: Looking for answers? Try searching our database.

Threading Model Switch? Anyone Know What It Is?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Hanna - 03 Jan 2007 17:03 GMT
I have upgraded a multi-threaded C# app from VS2003 (CLR 1.1) to VS2005
(CLR 2.0) and it's hopeless (Event Id 5000).  I believe there is a
switch somewhere that will allow me to revert the threading model to
1.1.  I could use this to prove that the issue is threading.  Can
anyone tell me how to set this switch, please?

thanks,
Hanna.
Jon Skeet [C# MVP] - 03 Jan 2007 21:39 GMT
> I have upgraded a multi-threaded C# app from VS2003 (CLR 1.1) to VS2005
> (CLR 2.0) and it's hopeless (Event Id 5000).  I believe there is a
> switch somewhere that will allow me to revert the threading model to
> 1.1.  I could use this to prove that the issue is threading.  Can
> anyone tell me how to set this switch, please?

What do you think the difference in threading model between 1.1 and 2.0
is?

Signature

Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet   Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too

Günter Prossliner - 04 Jan 2007 09:39 GMT
Hi Hanna!

> I have upgraded a multi-threaded C# app from VS2003 (CLR 1.1) to
> VS2005 (CLR 2.0) and it's hopeless (Event Id 5000).  I believe there
> is a switch somewhere that will allow me to revert the threading
> model to 1.1.

Do you meen Control.CheckForIllegalCrossThreadCalls? This is a static
property. If you set it to false, no Exceptions will be thrown when you are
accessing a Control from a Thread which have not created it.

> I could use this to prove that the issue is threading.

You are aware that IMO the 1.1 Behaviour is a bug. Cross-Thread Operation
where never allowed in Windows when Window-Handles are involved. If MAY work
sometimes, but it is not reliable.

You sould use .InvokeRequired / .Invoke for cross-thread operations within
Windows Forms.

GP

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.