Solved

Thread Safe: Event

Posted on 2009-05-09
3
415 Views
Last Modified: 2013-12-17
I use events in my methods and what I like to know is, must I do something to make the events thread-safe or are the already that by default?
0
Comment
Question by:AWestEng
3 Comments
 
LVL 33

Accepted Solution

by:
hongjun earned 500 total points
ID: 24343236
How to: Make Thread-Safe Calls to Windows Forms Controls
http://msdn.microsoft.com/en-us/library/ms171728.aspx

hongjun
0
 
LVL 6

Expert Comment

by:SaedSalman
ID: 24343772
at the constructor add this line of code:
Control.CheckForIllegalCrossThreadCalls = true;

CheckForIllegalCrossThreadCalls is enabled by default is visual studio 2005
0
 
LVL 1

Author Closing Comment

by:AWestEng
ID: 31579746
Not exactly what I was looking for, but maybe my fault. thx anyway
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question