Results 1 to 3 of 3

Thread: When use QReadWriteLock and when use QMutex?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2011
    Location
    Porto Alegre, Brazil
    Posts
    482
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    165
    Thanked 2 Times in 2 Posts

    Default When use QReadWriteLock and when use QMutex?

    Hello!

    I just discovered the existence of this class, QReadWriteLock, and when reading the Qt Assistant files, I noticed it seems very much like QMutex. In fact, the documentation states "In many cases, QReadWriteLock is a direct competitor to QMutex." The problem is that no comparison table was provided to learn when it's appropriate to use which of them, nor teeling in which situations there is no difference between using one or the other.

    My question is, therefore: when should one use QReadWriteLock instead of QMutex, and when the contrary should be done?

    Thanks,

    Momergil
    Last edited by Momergil; 29th April 2014 at 14:28. Reason: spelling corrections
    May the Lord be with you. Always.

Similar Threads

  1. QReadWriteLock locks for reading...but why?
    By Qtonimo in forum Qt Programming
    Replies: 5
    Last Post: 29th August 2012, 11:58
  2. Overriding QReadWriteLock's lockForRead and lockForWrite
    By mentalmushroom in forum Qt Programming
    Replies: 6
    Last Post: 19th July 2011, 14:47
  3. QMutex QMutex::Recursive is not a type name
    By Qiieha in forum Qt Programming
    Replies: 2
    Last Post: 9th May 2011, 14:01
  4. QReadWriteLock Question
    By qtYoda in forum Newbie
    Replies: 9
    Last Post: 7th April 2011, 11:03
  5. using QReadWriteLock in QMap and Qhash
    By HERC in forum Qt Programming
    Replies: 0
    Last Post: 1st July 2010, 13:00

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.