
8 Nov
2011
8 Nov
'11
11:22 a.m.
Andrey Semashev wrote:
I think, support for multi-module applications is a must for both libraries, but Boost.SmartPtr is more lucky in that regard since it requires more wide- spread atomic ops to operate, so the shared spinlock pool is unlikely to become an issue.
shared_ptr requires CAS, and if you have CAS, you have everything. It only needs to operate on single word integers though. Either way, it doesn't matter much because the "multi-module" platform is Windows, and shared_ptr doesn't use the spinlock pool for the reference count on Windows. It does use it for the atomic access functions though.