Hi Mikhail,

All windows mutexes are in fact recursive/reentrant, while pthread
mutexes aren't by default recursive.  To make OpenThreads::Mutex work
exactly the same under windows and all other operating systems you
either have to explictly use recursive mutexes on all platforms or
come up with a way of deadlock OpenThreads::Mutex when under windows.

OpenThreads::ReentrantMutex is a recursive mutex so you could use
this, but use it sparingly as in most threaded code you shouldn't be
re entering the same code.

Robert.

On Sun, Mar 20, 2011 at 12:03 PM, Mikhail I. Izmestev
<izmmish...@gmail.com> wrote:
> Hi *,
>
> I discovered some strange issue, on windows normal mutex works like recursive 
> :)
> Attached test code which after compilation on linux output:
> Mutex not recursive
>
> and on windows:
> Mutex is recursive
>
> Is this feature or bug?
>
> Mikhail.
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to