Merge pull request #1259 from alexmiller-apple/assertfix

Remove a broken ASSERT.
This commit is contained in:
Vishesh Yadav 2019-03-08 11:11:31 -08:00 committed by GitHub
commit 291522383a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 1 deletions

View File

@ -1218,7 +1218,6 @@ struct FlowLock : NonCopyable, public ReferenceCounted<FlowLock> {
explicit FlowLock(int64_t permits) : permits(permits), active(0) {}
Future<Void> take(int taskID = TaskDefaultYield, int64_t amount = 1) {
ASSERT(amount <= permits || active == 0);
if (active + amount <= permits || active == 0) {
active += amount;
return safeYieldActor(this, taskID, amount);