Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7491101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T15:52:28+00:00 2026-05-29T15:52:28+00:00

A colleague of mine recently stated it is fine for multiple read write threads

  • 0

A colleague of mine recently stated it is fine for multiple read write threads to access a c# dictionary if you don’t mind retreiving stale data. His justification was that since the program would reapeatedly read from the dictionary, stale data won’t be an issue.

I told him that locking a collection was always necessary when you have a writer thread because the internal state of the collection will get corrupted.

Am I mistaken?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T15:52:30+00:00Added an answer on May 29, 2026 at 3:52 pm

    You are correct, and your colleague is wrong: one can access a dictionary from multiple threads only in the absence of writers.

    .NET 4.0 adds ConcurrentDictionary<K,T> class that does precisely what its name implies.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A colleague of mine asked me to write a homework for him. Although this
Recently a colleague of mine said this: When using different sessions for producing and
A colleague of mine recently got bitten badly by writing out of bounds to
A colleague of mine replaced by mistake a web.config file which we don't have
A colleague of mine is working on a .NET application. He needs to write
the other day a colleague of mine stated that using static classes can cause
Recently, I saw a colleague of mine instantiate his classes in a constructor, so
A colleague of mine has written a DLL file for me to use called
A colleague of mine came across an article on codeproject over the weekend which
Update: Issue Resolved A colleague of mine was changing a cell during Workbook_BeforeSave() without

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.