https://github.com/rigtorp/binarysemaphore
Binary semaphore using futexes.
https://github.com/rigtorp/binarysemaphore
Last synced: about 2 months ago
JSON representation
Binary semaphore using futexes.
- Host: GitHub
- URL: https://github.com/rigtorp/binarysemaphore
- Owner: rigtorp
- License: mit
- Created: 2016-05-14T21:27:20.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-12-04T22:18:14.000Z (over 6 years ago)
- Last Synced: 2025-03-24T00:31:28.500Z (about 2 months ago)
- Language: C++
- Homepage:
- Size: 2.93 KB
- Stars: 9
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BinarySemaphore.h
[](https://raw.githubusercontent.com/rigtorp/TokenBucket/master/LICENSE)
[Binary semaphore](https://en.wikipedia.org/wiki/Semaphore_(programming))
using [futexes](https://en.wikipedia.org/wiki/Futex). Useful for
saving energy when waiting for new data in lock-free data structures.
The fast path can still be lock-free, only when the consumer has
blocked will you incur the cost of as syscall.## About
This project was created by [Erik Rigtorp](http://rigtorp.se)
<[[email protected]](mailto:[email protected])>.