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

  • Home
  • SEARCH
  • 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 8134797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T10:10:26+00:00 2026-06-06T10:10:26+00:00

I have a threaded server application that stores List<Item> dataList . There is a

  • 0

I have a threaded server application that stores List<Item> dataList. There is a single writing thread that modifies, adds and removes items from the list, and multiple threads that read from this list.

What kind of synchronization is required to ensure the writes happen in order as they were called and provide maximum performance for the reads i.e. if a write is busy reads must just provide the previous value before the read.

I currently use ReaderWriterLockSlim for it’s separate Read and Write locking capabilities, but it feels as though there is a lot of expensive overhead calling the ReadLocks that is unnecessary since all I want is for writes to be guaranteed in order?

As far as I understand reading reference types and value types should provide atomic access so locking is perhaps not necessary?

Performance is a big concern and it seems like optimization of my synchronization structure could improve by quite a bit.

  • 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-06-06T10:10:27+00:00Added an answer on June 6, 2026 at 10:10 am

    Sounds like you have a producer/consumer pattern. In .Net 4, there is the ConcurrentQueue<T> class in the System.Threading.Concurrent namespace. You are only synchronising when adding and removing from queue.

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

Sidebar

Related Questions

OK, so I have a very large multi-threaded unmanaged c++ application (server) that runs
I have a fairly complex multi threaded application (server) that from time to time
I have written a simple single threaded client server application in Visual C++ .
I'm implementing a simple threaded application in which I have a server thread, and
[Cross-posted from lib-curl mailing list] I have a single threaded app (MSVC C++ 2005)
Hello I developed a multi-threaded TCP server application that allows 10 concurrent connections receives
I have a multi-threaded console application acting as a server. The server spawns a
I have a shutdown hook handler defined in a SINGLE threaded C application. int
I currently have a GUI single-threaded application in C++ and Qt. It takes a
I have a multi threaded client server application which uses Sockets. When a new

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.