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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T04:36:27+00:00 2026-06-09T04:36:27+00:00

i am building a network intrusion detection system using visual c++ and one of

  • 0

i am building a network intrusion detection system using visual c++ and one of its component is a tcp session manager for the whole network. The tcp session data is stored in a concurrent vector so that it can be accessed from other threads. I found out there is no easy way to remove a session from the concurrent vector once the session is closed. So my QUESTION is what is the smartest method you know of for removing items from concurrent vectors.

Smart == fairly easy to program without too much performance hit
Thankyou

  • 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-09T04:36:29+00:00Added an answer on June 9, 2026 at 4:36 am

    I’d consider using a std::set instead of a vector here – especially if the number of items stored is large. I imagine you’ll also want to perform lookups frequently.

    Search and removal from the set is O(log(n)) complexity rather than O(n) for the std::vector – although the trivial insertion case in the is O(1) rather than O(log(n)) with the set.

    You will also need mutex to protect all of these operations.

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

Sidebar

Related Questions

I am building a overlay network system to test a protocol (Uni research). I
I am building a server back-end for a mobile social network using Windows Azure.
I'm using ruby's ai4r gem, building a neural network. Version 1.1 of the gem
I'm building a social network, and now I faced a problem. So, which one
Building an MVC 2.0 web site and using Content Delivery Network (CDN) in my
Hi I am building a social network in dreamweaver using php and sql as
I'm planning on building a sensor network using at least two different applications -
I'm building a Python script to do a network inventory on our internal system.
Me and a partner are building a social network, one of the key components
I'm building a system for monitoring several large web sites (resources), using distributed web

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.