Add weak pointer handling (#3763)

This commit is contained in:
Tim Sylvester
2025-09-02 07:35:25 -07:00
committed by GitHub
parent 5ba738f30c
commit 764f73c97a
28 changed files with 82 additions and 38 deletions

View File

@@ -80,7 +80,8 @@ TEST(Actor, DestructionBlocksOnReceive) {
TEST(Actor, DestructionBlocksOnSend) {
// Destruction blocks until the actor is not being sent a message.
struct TestScheduler : public Scheduler {
// NOTE: Any derived class must invalidate `weakFactory` in the destructor
struct TestScheduler final : public Scheduler {
std::promise<void> promise;
std::future<void> future;
std::atomic<bool> waited;