Results 1 to 5 of 5

Thread: Mutex between two or more process

  1. #1
    Join Date
    Sep 2010
    Posts
    45
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Mutex between two or more process

    In the qt libs there exists the possibility to create a mutex shared between two or more process?

    I'm searching something with the function tryLock() (similar to the function described in the QMutex class).

    Tnx.

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Mutex between two or more process

    Is this what you're looking for?
    http://doc.qt.nokia.com/4.7/qsharedmemory.html

  3. The following user says thank you to tbscope for this useful post:

    bred (1st November 2010)

  4. #3
    Join Date
    Sep 2010
    Posts
    45
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Mutex between two or more process

    Quote Originally Posted by tbscope View Post
    Is this what you're looking for?
    http://doc.qt.nokia.com/4.7/qsharedmemory.html
    Yes and No.

    No: I'm searching for something with the tryLock() member function.
    The tryLock() function exits immediately by returning false if the Mutex is locked.

    Yes: It's shared between two or more process.

  5. #4
    Join Date
    Jul 2009
    Location
    Enschede, Netherlands
    Posts
    462
    Thanked 69 Times in 67 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Mutex between two or more process

    Oh wait.. between processes, never mind...
    Horse sense is the thing that keeps horses from betting on people. --W.C. Fields

    Ask Smart Questions

  6. #5
    Join Date
    Sep 2010
    Posts
    45
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Mutex between two or more process

    Quote Originally Posted by franz View Post
    Oh wait.. between processes, never mind...
    Not in my case.

    But it's also possible to implement a traLock() function starting from the QSharedMemory.
    If there's not any others solution.

Similar Threads

  1. Mutex unlock without locking it
    By ^NyAw^ in forum Qt Programming
    Replies: 1
    Last Post: 23rd September 2010, 17:17
  2. QFileDialog in modeless QDialog and mutex error
    By enno in forum Qt Programming
    Replies: 2
    Last Post: 7th April 2010, 20:49
  3. Thread mutex lock and return value
    By ^NyAw^ in forum Qt Programming
    Replies: 5
    Last Post: 13th February 2010, 07:32
  4. Qthread mutex
    By dognzhe in forum Qt Programming
    Replies: 5
    Last Post: 18th May 2009, 05:46
  5. How to communicate Qt Process with non-qt process
    By nrabara in forum Qt for Embedded and Mobile
    Replies: 9
    Last Post: 15th February 2009, 21:01

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.