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 8841271
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:40:25+00:00 2026-06-14T10:40:25+00:00

Could someone suggest good CircularBuffer implementation? I need both not thread-safe and thread-safe versions.

  • 0

Could someone suggest good CircularBuffer implementation? I need both “not thread-safe” and “thread-safe” versions. I expect following operations:

  • ability to provide size of the buffer when creating
  • adding elements
  • iterating elements
  • removing elements while iterating
  • probably removing elements

I expect implementation to be highly optimized in terms of speed and used memory, average and worst times etc.

I expect “not thread-safe” implementation to be extremely fast. I expect “thread-safe” implementation to be fast, probably using “lock-free code” for synchronization and it’s ok to have some restrictions if this is required for speed.

If buffer is too small to store new (added) element it’s ok to silenty override existent element or raise exception.

Should I use disruptor.net?

Adding link to a good example Disruptor.NET example

  • 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-14T10:40:26+00:00Added an answer on June 14, 2026 at 10:40 am

    Not thread safe:

    System.Collections.Generic.Queue

    Thread safe:

    System.Collections.Concurrent.ConcurrentQueue

    or

    System.Collections.Concurrent.BlockingCollection (which uses a concurrent queue by default internally)

    Although technically you really shouldn’t use the term “thread safe”. It’s simply too ambiguous. The first is not designed to be used concurrently by multiple threads, the rest are.

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

Sidebar

Related Questions

Could someone provide a sample implementation for rotating a button on a thread ?
Can someone help suggest a good way to achieve the following please? I want
I was wondering if someone could suggest me some good books for developing iPhone
Could someone suggest a good workflow that, Independently on the number of disparate tools
Could someone suggest me any good beginners guide on how to create web pages
Could someone suggest the best way to have the following switch statement? I don't
Could someone suggest a good library for vector graphics? Several libraries support drawing shapes,
Could someone please suggest a good way of taking a global seed value e.g.
I was hoping someone could suggest a good workaround for my situation. I'm working
Could someone suggest me a tool to find circular dependencies? I tried with a

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.