diff options
author | yang-g <yangg@google.com> | 2015-08-05 14:24:00 -0700 |
---|---|---|
committer | yang-g <yangg@google.com> | 2015-08-05 14:24:00 -0700 |
commit | a73dc1c708baf06e746f7a3f13fa14958a4ee2a1 (patch) | |
tree | 0b8f072d396e74127c779db4daec6b1f86220e90 /include/grpc++ | |
parent | c0f32791754a7892078c4388ded9bd057c2d2e73 (diff) |
specialize deadline type and implementation
Diffstat (limited to 'include/grpc++')
-rw-r--r-- | include/grpc++/channel_interface.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/include/grpc++/channel_interface.h b/include/grpc++/channel_interface.h index c5a5072298..65161275c6 100644 --- a/include/grpc++/channel_interface.h +++ b/include/grpc++/channel_interface.h @@ -65,16 +65,24 @@ class ChannelInterface : public CallHook, // Return the tag on cq when the channel state is changed or deadline expires. // GetState needs to called to get the current state. - template <typename T> virtual void NotifyOnStateChange(grpc_connectivity_state last_observed, - const T& deadline, + gpr_timespec deadline, CompletionQueue* cq, void* tag) = 0; // Blocking wait for channel state change or deadline expires. // GetState needs to called to get the current state. - template <typename T> virtual bool WaitForStateChange(grpc_connectivity_state last_observed, - const T& deadline) = 0; + gpr_timespec deadline) = 0; +#ifndef GRPC_CXX0X_NO_CHRONO + virtual void NotifyOnStateChange( + grpc_connectivity_state last_observed, + const std::chrono::system_clock::time_point& deadline, + CompletionQueue* cq, void* tag) = 0; + virtual bool WaitForStateChange( + grpc_connectivity_state last_observed, + const std::chrono::system_clock::time_point& deadline) = 0; +#endif // !GRPC_CXX0X_NO_CHRONO + }; } // namespace grpc |