Mutex equivalent in Cocoa

Discussion in 'Mac Programming' started by satyam90, Feb 20, 2008.

  1. macrumors regular

    satyam90

    Joined:
    Jul 30, 2007
    Location:
    Bangalore, India
    #1
    I am using mutex objects in C# to create single instance of the application. I will try to create a mutex object in main, if already created, it will return displaying message "Another instance is running".
    I would like to know the euqivalent of mutex in Cocoa. I couldn't find the equivalent of mutex in documentation. Or any other way is there to create single instance of application in Mac programming.
     
  2. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    The very first result on Google for "Cocoa Mutex" returns the Apple documentation on the very subject.

    Seriously: next time actually try searching instead of lying to us and saying you have.
     
  3. macrumors G4

    Eraserhead

    Joined:
    Nov 3, 2005
    Location:
    UK
    #3
    ^^ You're wrong now, the first hit is now this thread :p.
     
  4. Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #4
    Wow, the googlebot is fast, a little too fast...
     
  5. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #5
    Yikes! I guess that means that MacRumors (as a whole) has a higher PageRank score than developer.apple.com! We rule :D
     

Share This Page