Hi all,
On 8/12/06, Paul Martz <[EMAIL PROTECTED]> wrote: > Seems like this could be rewritten to use a Win32 CRITICAL_SECTION and it > would be much cleaner, though off the top of my head I'm not sure how to > implement trylock(), but I will look into it. >
> Any idea why a CRITICAL_SECTION wasn't used initially? I'm not familiar with > the InterlockExchange() function. Don't know, I haven't been party to the Windows OpenThreds implementation, but my guess is that the contributors were learning threading/MS's thread API while developing the code. Alot of code is developed this way, OpenSceneGraph wouldn't exist if it weren't for the spirit of having a go at something you've never done before ;-)
Initialy win32 used ptherads on win32 adding yet another dependancy. I redid implementation using win32 threading. Actual mutex implementation is slightly modified implementation which I picked up some time ago, I don't remember where but I believe it' from some STL implementation (STLport? boost? ). It was fastest mutex I could find at the time. ( Put aside the race problem that win32 CRITICAL_SECTION has) -- Boris _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
