- Use semaphores instead of condition variables for limiting outgoing connections
- Cleanup handling of outgoing connections
- Use polling implementation of semaphores on OSX, as boost's semaphores seem to spinlock.
Semaphores #1252
pull sipa wants to merge 2 commits into bitcoin:master from sipa:semaphores changing 3 files +131 −47-
sipa commented at 7:15 PM on May 10, 2012: member
-
gavinandresen commented at 8:01 PM on May 10, 2012: contributor
ACK
-
laanwj commented at 8:23 AM on May 11, 2012: member
ACK on the idea.
Could the "Grant" be made into a RAII primitive maybe somehow? I am reasonably convinced that this is correct, but manual acquiring and releasing makes me a bit uneasy, as there could always been some forgotten case (or might easily arise in the future).
Also I wonder why boost loves spinlocking on OSX so much, and whether there is an upstream issue for this :/ It's not like semaphores are a zero-day experimental threading feature with incomplete support on operating systems.
-
Use semaphores instead of condition variables e60e2cf5b5
-
Use polling instead of boost's broken semaphore on OSX 8fe5615047
-
sipa commented at 9:35 AM on May 11, 2012: member
@gavinandresen You want this backported for 0.6.2.2, or stick with the earlier version?
-
laanwj commented at 9:37 AM on May 11, 2012: member
ACK
- gmaxwell closed this on May 12, 2012
-
gmaxwell commented at 1:06 AM on May 12, 2012: contributor
(included in 1260)
- suprnurd referenced this in commit 3b9a748d5e on Dec 5, 2017
- lateminer referenced this in commit 3b8caa058f on Jan 22, 2019
- lateminer referenced this in commit e7e1dd4d12 on May 6, 2020
- DrahtBot locked this on Sep 8, 2021