Commit 9afbce9e authored by Jakob Otto's avatar Jakob Otto

simplify duration template

parent b14bcc85
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#pragma once #pragma once
#include <chrono>
#include <set> #include <set>
#include <string> #include <string>
#include <thread> #include <thread>
...@@ -87,10 +88,8 @@ public: ...@@ -87,10 +88,8 @@ public:
/// Resolves a path to a remote actor. /// Resolves a path to a remote actor.
void resolve(const uri& locator, const actor& listener); void resolve(const uri& locator, const actor& listener);
template <class Handle = actor, class Rep, class Period> template <class Handle = actor, class Duration = std::chrono::seconds>
expected<Handle> expected<Handle> remote_actor(const uri& locator, Duration timeout_duration
remote_actor(const uri& locator,
std::chrono::duration<Rep, Period> timeout_duration
= std::chrono::seconds(5)) { = std::chrono::seconds(5)) {
scoped_actor self{sys_}; scoped_actor self{sys_};
resolve(locator, self); resolve(locator, self);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment