Results 1 to 5 of 5

Thread: can i use stl type vector as the shared memory of two threads?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2008
    Location
    Nanjing, China
    Posts
    66
    Thanks
    12
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default can i use stl type vector as the shared memory of two threads?

    I try it , at least now it works well.
    The program will be running almost all day, the size of vector could be large,
    Can I use vector as the shared memory of two threads? I use QThread.!

    ps: one thread is producer, the other is consumer.The producer emit signal when the shared vector has some data, the consumer consume the data and call clear() of the vector.

    Thank you in advance
    Last edited by calmspeaker; 29th December 2008 at 03:04.
    Jerry

Similar Threads

  1. Compile 4.4.0
    By LordQt in forum Installation and Deployment
    Replies: 18
    Last Post: 29th May 2008, 13:43
  2. dummy question(Error)
    By Masih in forum Qt Programming
    Replies: 12
    Last Post: 19th July 2007, 23:38
  3. saving a c string of variable length in a shared memory?
    By nass in forum General Programming
    Replies: 4
    Last Post: 3rd January 2007, 14:40

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.