Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

anni.saini

macrumors newbie
Original poster
Jul 15, 2009
18
0
boost::mutex::scoped_lock

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
 
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.