Scoped_lock on Mac 10.5 and 10.6

Discussion in 'Mac Programming' started by anni.saini, Apr 14, 2010.

  1. anni.saini macrumors newbie

    Joined:
    Jul 15, 2009
    #1
    I'm using scoped_lock in my application. Where I observed scoped_lock is behaving differently on Mac 10.5 and 10.6.

    On Mac 10.5, scoped_lock is failed to acquire the lock and it blocks the thread and wait for the lock to become available while on Mac 10.6 its working.

    Any idea about this distinct behavior...

    thanks,
    anni
     
  2. Detrius macrumors 68000

    Joined:
    Sep 10, 2008
    Location:
    Asheville, NC
  3. anni.saini thread starter macrumors newbie

    Joined:
    Jul 15, 2009
    #3
    boost version 1.36.0
     
  4. Detrius macrumors 68000

    Joined:
    Sep 10, 2008
    Location:
    Asheville, NC
    #4
    I know it's rarely this simple, but maybe you should try a newer version of boost.

    That version was released in August of 2008, well before Snow Leopard shipped, but Leopard had been out for a while. If I had to take a shot in the dark, I'd say that there's a bug in your code that's resulting in your code being locked when you expect it not to be, but the mutex doesn't work correctly at all with that version of boost under 10.6.

    Of course, there are other possible explanations. You'll have more information if you try a newer version of the library and verify whether it changes this specific issue.
     

Share This Page