1
0
mirror of https://github.com/apple/foundationdb.git synced 2025-05-22 14:55:03 +08:00

Merge pull request from sfc-gh-tclinkenbeard/add-override-dummythreadpool

Add override keyword to DummyThreadPool methods
This commit is contained in:
Andrew Noyes 2021-01-22 14:18:24 -08:00 committed by GitHub
commit bd52ef7cb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -114,11 +114,11 @@ public:
~DummyThreadPool() {} ~DummyThreadPool() {}
DummyThreadPool() : thread(nullptr) {} DummyThreadPool() : thread(nullptr) {}
Future<Void> getError() const override { return errors.getFuture(); } Future<Void> getError() const override { return errors.getFuture(); }
void addThread( IThreadPoolReceiver* userData ) { void addThread(IThreadPoolReceiver* userData) override {
ASSERT( !thread ); ASSERT( !thread );
thread = userData; thread = userData;
} }
void post( PThreadAction action ) { void post(PThreadAction action) override {
try { try {
(*action)( thread ); (*action)( thread );
} catch (Error& e) { } catch (Error& e) {
@ -127,15 +127,9 @@ public:
errors.sendError( unknown_error() ); errors.sendError( unknown_error() );
} }
} }
Future<Void> stop(Error const& e) { Future<Void> stop(Error const& e) override { return Void(); }
return Void(); void addref() override { ReferenceCounted<DummyThreadPool>::addref(); }
} void delref() override { ReferenceCounted<DummyThreadPool>::delref(); }
void addref() {
ReferenceCounted<DummyThreadPool>::addref();
}
void delref() {
ReferenceCounted<DummyThreadPool>::delref();
}
private: private:
IThreadPoolReceiver* thread; IThreadPoolReceiver* thread;