C#/.NET Fundamentals: Safely and Efficiently Raising Events(www.blackrabbitcoder.net)

submitted by BlackRabbitCoderBlackRabbitCoder(661) 5 months, 24 days ago

A couple of posts ago, I discussed the EventHandler<TEventArgs> and EventHandler delegates, and in particular at one point mentioned in a sidebar that you need to watch out for thread-safety in order to safely raise events in a multi-threaded environment. There was an interesting discussion in the comments about different ways that people achieve their thread-safety when raising events, and that got me interested in exploring them more in detail and checking them for performance. This post examines several ways to raise events in a thread-safe manner, and compares the performance aspects of each.

1 comment |category: |Views: 30

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

posted by BlackRabbitCoderBlackRabbitCoder(661) 5 months, 24 days ago 0

New post!

Reply

information Login or create an account to comment on this story