Drop SemaphoreActor context.

This commit is contained in:
levlam 2022-06-14 16:30:09 +03:00
parent 782aa6a2ec
commit dcb77ce187

View File

@ -42,6 +42,7 @@
#include "td/utils/utf8.h"
#include "td/utils/VectorQueue.h"
#include <memory>
#include <tuple>
#include <utility>
@ -66,6 +67,11 @@ class SemaphoreActor final : public Actor {
size_t capacity_;
VectorQueue<Promise<Promise<Unit>>> pending_;
void start_up() final {
set_context(std::make_shared<ActorContext>());
set_tag(string());
}
void finish(Result<Unit>) {
capacity_++;
if (!pending_.empty()) {