Results 1 to 2 of 2

Thread: QVector<> thread safe?

  1. #1
    Join Date
    Nov 2008
    Posts
    183
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QVector<> thread safe?

    I'm looking for a pointer to a link to official documentation which will either confirm or deny if QVector<> is thread safe when it comes to appends and deletions. Cannot seem to find _official_ word either way.

    Thanks,
    Roland

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QVector<> thread safe?

    A Qt class is only thread-safe is the documentation mentions that on top of the page (with the wording "Note: All functions in this class are thread-safe."). Since there is no such mention for QVector, the official docs say it is not thread-safe. You can compare it to QMutex, for example.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Thread safe or not
    By raj_iv in forum Qt Programming
    Replies: 1
    Last Post: 19th January 2013, 21:28
  2. Replies: 5
    Last Post: 7th February 2012, 22:13
  3. thread-safe
    By babymonsta in forum Qt Programming
    Replies: 0
    Last Post: 5th May 2010, 10:18
  4. Is a QProcess thread safe in Qt4?
    By Jay_D in forum Qt Programming
    Replies: 4
    Last Post: 1st September 2009, 16:38
  5. What makes something not thread safe?
    By tgreaves in forum Newbie
    Replies: 9
    Last Post: 20th February 2009, 20:16

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.