Thread: Special Container Object?

  1. #1
    Registered User
    Join Date
    Feb 2003
    Posts
    265

    Special Container Object?

    I think i may need a special container, depending on how the OS, and language handle what i want to do. I need something like a STL queue class, however it has to support multiple threads accessing it all at once, reading, writing, whatever. The problem is when i impliment it taking a strait forward approach, i end up with 2 access violations(occouring at random as the instructions attempt to execute too close to one another). One is where im trying to write to it, and the other is when i try to print the top element of it using cout. I need a simple way to impliment a queue system, thats thread safe. Outputting it is another concern. In testing im using cout, however in the final product it will be using sockets. I believe i read a thread a week back that said windows sockets were thread safe, however im not entirely sure how aucurate it may be. Thanks for your time, i eagerly await your replys.
    Last edited by Geolingo; 09-05-2003 at 02:26 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how to get the size of an STL container object?!!!
    By sam-j89 in forum C++ Programming
    Replies: 7
    Last Post: 05-12-2009, 02:56 PM
  2. Telling a shared_ptr not to delete object?
    By TriKri in forum C++ Programming
    Replies: 5
    Last Post: 08-16-2008, 04:26 AM
  3. ERRPR: Object reference not set to an instance of an object
    By blackhack in forum C++ Programming
    Replies: 1
    Last Post: 07-13-2005, 05:27 PM
  4. Set Classes
    By Nicknameguy in forum C++ Programming
    Replies: 13
    Last Post: 10-31-2002, 02:56 PM
  5. Set Classes
    By Nicknameguy in forum C++ Programming
    Replies: 3
    Last Post: 10-21-2002, 07:40 PM