Skip to content

Commit

Permalink
Make AsyncProcessor::processInteraction pure virtual
Browse files Browse the repository at this point in the history
Summary: `processInteraction()` is part of the critical path for interactions in Resource Pools and can lead to undefined behavior if it is not implemented. Let's make the contract more clear and force custom `AsyncProcessor` implementations to provide an implementation for it.

Reviewed By: tlj77

Differential Revision: D62590107

fbshipit-source-id: 69fe9e9bee745766d891b5fc5f33d9953d6845eb
  • Loading branch information
Akrama Baig Mirza authored and facebook-github-bot committed Oct 3, 2024
1 parent 937b0f3 commit 5642fd8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions server/cpp/HaskellProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ class HaskellAsyncProcessor : public AsyncProcessor {
ServerRequest&& request,
const AsyncProcessorFactory::MethodMetadata& methodMetadata) override;

void processInteraction(ServerRequest&&) override {
LOG(FATAL)
<< "This AsyncProcessor doesn't support Thrift interactions. "
<< "Please implement processInteraction to support interactions.";
}

protected:
TCallback callback_;
AsyncProcessorFactory::MethodMetadataMap& metadataMap_;
Expand Down

0 comments on commit 5642fd8

Please sign in to comment.