DotNetKick.com is an open-source project. Please report any bugs and let us know your great suggestions. Currently running svn revision 620 (rss)

Kick Spy!, Kick Zeitgeist and Kick Widgets

1
kicks
submitted by bigtoe 5 months, 23 days ago

lysaghtn.weebly.com — Using SyncLock (or lock in C#) to block all threads accessing a block of code can be overkill. SyncLock requires that all CPU instructions be cleared from the registers so that thread synchronization can be performed safely and it also requires a lot of management by the .NET threading libraries. In certain situation where multiple threads are running, you may require that just a single thread execute a piece of code at any one time. I've used this in situations where multiple threads are there for performance reasons but only 1 thread at a time should say clear down/refresh cache entries, but any of those threads could do the work.

Add a comment 1 comment | category: | Views: 14 | Get KickIt image code
tags: | tag it

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:
You might also want to check out Jeffrey Richter's SpinWaitLock which is a more complete implementation of the same concept (with the required things such as Begin/EndCriticalRegion calls): http://msdn.microsoft.com/en-us/magazine/cc163726.aspx
posted by gregbeech 5 months, 23 days ago



information Login or create an account to comment on this story
 

Sponsored Link: www.carlist.ie

Search:

Ads via The Lounge