apple / apple/foundationdb

Improve FlowLock API

Open
#1,234 0 comments 0 reactions 1 assignee Claimed by @jzhou77 View on GitHub
Dominant language
C++
Stars
16.7k
Forks
1.6k
Avg merge
1d 20h
Merged PRs (30d)
126

Description

FlowLock needs some updates.

* `FlowLock::take()` should return a `FlowLock::Releaser` rather than forcing a client to instantiate one immediately afterwards.
* `FlowLock::take()` should have its arguments as `(int64_t amount, int TaskID)` rather than the other way around
* Renaming `FlowLock` to something like `FlowLimiter` or `FlowSemaphore` or some name that implies that it's more than a mutex would be great.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.