Skip to content

Commit

Permalink
Merge pull request #23 from no92/queue-empty
Browse files Browse the repository at this point in the history
  • Loading branch information
no92 authored May 9, 2024
2 parents a1a0100 + 2f425d6 commit 4439a38
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/async/queue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ struct queue {
return {this, ct};
}

bool empty() {
return buffer_.empty();
}

frg::optional<T> maybe_get() {
frg::unique_lock lock{mutex_};

Expand Down

0 comments on commit 4439a38

Please sign in to comment.