Semaphores #1252

pull sipa wants to merge 2 commits into bitcoin:master from sipa:semaphores changing 3 files +131 −47
  1. sipa commented at 7:15 PM on May 10, 2012: member
    • 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.
  2. gavinandresen commented at 8:01 PM on May 10, 2012: contributor

    ACK

  3. 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.

  4. Use semaphores instead of condition variables e60e2cf5b5
  5. Use polling instead of boost's broken semaphore on OSX 8fe5615047
  6. sipa commented at 9:31 AM on May 11, 2012: member

    @laanwj Excellent idea; why didn't I think of that myself?

    Updated and rebased.

  7. 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?

  8. laanwj commented at 9:37 AM on May 11, 2012: member

    ACK

  9. gmaxwell closed this on May 12, 2012

  10. gmaxwell commented at 1:06 AM on May 12, 2012: contributor

    (included in 1260)

  11. suprnurd referenced this in commit 3b9a748d5e on Dec 5, 2017
  12. lateminer referenced this in commit 3b8caa058f on Jan 22, 2019
  13. lateminer referenced this in commit e7e1dd4d12 on May 6, 2020
  14. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-19 09:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me