The official Fatica Labs Blog! RSS 2.0
# Thursday, June 24, 2010

L’accesso in scrittura ad un dictionary non è thread safe. In generale, se si utilizza un Dictionary<TKey,TValue> in .NET bisognerebbe loccare le operazioni di scrittura, e quelle di lettura se si suppone ci possano essere delle scritture/cancellazioni concomitanti. Tuttavia, utilizzare in modo “cieco” il lock, sia per le scritture che per le letture può avere dei decrementi di velocità. Ho trovato un’ottima e riconosciuta implementazione di un dictionary thread safe a questo indirizzo.

Thursday, June 24, 2010 8:28:17 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0] - Trackback


All comments require the approval of the site owner before being displayed.
OpenID
Please login with either your OpenID above, or your details below.
Name
E-mail
(will show your gravatar icon)
Home page

Comment (Some html is allowed: a@href@title, b, strike, strong) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview
My Stack Overflow
Contacts

Send mail to the author(s) E-mail

Tags
profile for Felice Pollano at Stack Overflow, Q&A for professional and enthusiast programmers
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2012
Felice Pollano
Sign In
Statistics
Total Posts: 143
This Year: 3
This Month: 0
This Week: 0
Comments: 105
This blog visits
All Content © 2012, Felice Pollano
DasBlog theme 'Business' created by Christoph De Baene (delarou) and modified by Felice Pollano