fix event_bus_test
All checks were successful
linux-aarch64-cpu-gcc / linux-gcc-aarch64 (push) Successful in 1m24s
linux-mips64-gcc / linux-gcc-mips64el (Release) (push) Successful in 1m37s
linux-x64-gcc / linux-gcc (Release) (push) Successful in 1m35s
linux-arm-gcc / linux-gcc-armhf (push) Successful in 1m50s
linux-x64-gcc / linux-gcc (Debug) (push) Successful in 2m36s
linux-mips64-gcc / linux-gcc-mips64el (Debug) (push) Successful in 3m23s
All checks were successful
linux-aarch64-cpu-gcc / linux-gcc-aarch64 (push) Successful in 1m24s
linux-mips64-gcc / linux-gcc-mips64el (Release) (push) Successful in 1m37s
linux-x64-gcc / linux-gcc (Release) (push) Successful in 1m35s
linux-arm-gcc / linux-gcc-armhf (push) Successful in 1m50s
linux-x64-gcc / linux-gcc (Debug) (push) Successful in 2m36s
linux-mips64-gcc / linux-gcc-mips64el (Debug) (push) Successful in 3m23s
This commit is contained in:
parent
35e01dccd2
commit
bf1584c750
@ -148,6 +148,8 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EventBus *operator->() { return this; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
sled::Mutex mutex_;
|
sled::Mutex mutex_;
|
||||||
std::unordered_map<std::type_index, std::function<void(EventBus *)>> cleanup_handlers_ GUARDED_BY(mutex_);
|
std::unordered_map<std::type_index, std::function<void(EventBus *)>> cleanup_handlers_ GUARDED_BY(mutex_);
|
||||||
|
@ -89,7 +89,7 @@ TEST_SUITE("EventBus")
|
|||||||
std::atomic<int> &data;
|
std::atomic<int> &data;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct AotmicEventSubscriber : public sled::EventBus::Subscriber {
|
struct AotmicEventSubscriber : public sled::EventBus::Subscriber<> {
|
||||||
virtual ~AotmicEventSubscriber() = default;
|
virtual ~AotmicEventSubscriber() = default;
|
||||||
|
|
||||||
void OnEvent(AtomicEvent event) { event.data.fetch_add(1); }
|
void OnEvent(AtomicEvent event) { event.data.fetch_add(1); }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user