From: P. D. <sh...@gm...> - 2008-11-20 12:28:53
|
>> From what i saw the ref counting sytem is not thread safe. Any idea how this could be >> solved? >> > off the top of my head, the reference counting variable should be > declared 'volatile', after that the compiler should be smart enough to > use atomic intrinsics when incrementing/decrementing the counter, i'll > change that now > on a second thought, one should never make this kind of assumptions, atomicity has to be explicit, unfortunately this sacrifices some portability. I'll see what I can do, possibly without adding dependencies on third-party libraries like APR or Boost. |