Pointer.h/intrusive_ptr_base class is too heavy-weight
Bug #617591 reported by
Gennady Proskurin
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
DC++ |
Fix Released
|
Undecided
|
Unassigned | ||
LinuxDC++ |
Confirmed
|
Medium
|
Unassigned |
Bug Description
"Pointer.
Patch attached, which uses portable atomic reference counters from boost.
It uses boost::
Related branches
lp://qastaging/~gpr/linuxdcpp/sync
Ready for review
for merging
into
lp://qastaging/linuxdcpp
- LinuxDC++ Team: Pending requested
-
Diff: 489 lines (+171/-91)12 files modifieddcpp/Atomic.h (+122/-0)
dcpp/BufferedSocket.cpp (+3/-3)
dcpp/BufferedSocket.h (+5/-1)
dcpp/Client.cpp (+6/-6)
dcpp/Client.h (+14/-6)
dcpp/CriticalSection.h (+7/-27)
dcpp/Pointer.h (+4/-4)
dcpp/Semaphore.h (+5/-2)
dcpp/ShareManager.cpp (+3/-3)
dcpp/ShareManager.h (+2/-1)
dcpp/Thread.cpp (+0/-4)
dcpp/Thread.h (+0/-34)
lp://qastaging/~gpr/dcplusplus/sync
Ready for review
for merging
into
lp://qastaging/dcplusplus
- Jacek Sieka: Needs Information
-
Diff: 408 lines (+171/-53)10 files modifieddcpp/Atomic.h (+122/-0)
dcpp/BufferedSocket.cpp (+3/-3)
dcpp/BufferedSocket.h (+5/-1)
dcpp/Client.cpp (+6/-6)
dcpp/Client.h (+14/-6)
dcpp/CriticalSection.h (+7/-27)
dcpp/Pointer.h (+4/-4)
dcpp/Semaphore.h (+5/-2)
dcpp/ShareManager.cpp (+3/-3)
dcpp/ShareManager.h (+2/-1)
tags: | added: core |
Changed in dcplusplus: | |
status: | New → Fix Committed |
To post a comment you must log in.
If the issue is that Thread::safeInc/Dec functions have too coarse grained of a lock, then they need to be fixed, not just fix one file that uses them. Either that or we need to replace calls to safeInc/Dec everywhere with atomic_count and remove these functions. I think the more stuff we can use from boost to remove non-portable #ifdef _WIN32 #else sections, the better.